update page now

Voting

: one minus zero?
(Example: nine)

The Note You're Voting On

eddi13
10 years ago
check whether the process is running. windows-linux
<?php
function isRunning($pid) {
        $isRunning = false;
        if(strncasecmp(PHP_OS, "win", 3) == 0) {
            $out = [];
            exec("TASKLIST /FO LIST /FI \"PID eq $pid\"", $out);
            if(count($out) > 1) {
                $isRunning = true;
            }
        }
        elseif(posix_kill(intval($prevPid), 0)) {
            $isRunning = true;
        }
        return $isRunning;
}
?>

<< Back to user notes page

To Top