public function isRunning(int $pid): bool
    {
        $cmd = sprintf('kill -0 %d 2>&1', $pid);
        $this->logger->debug(__METHOD__ . ": Exec command: $cmd");
        exec($cmd, $output, $return_var);

        return $return_var === 0;
    }
public function isRunning(int $pid): bool
    {
        $cmd = sprintf('kill -0 %d 2>&1', $pid);
        $this->logger->debug(__METHOD__ . ": Exec command: $cmd");
        exec($cmd, $output, $return_var);

        return $return_var === 0;
    }
public function isRunning ( int $ pid ) : bool { $ cmd = sprintf ( 'kill -0 %d 2>&1' , $ pid ) ; $ this -> logger -> debug ( __METHOD__ . ": Exec command: $cmd" ) ; exec ( $ cmd , $ output , $ return_var ) ; return $ return_var === 0 ; }
Check whether a pid is running.

@throws Exception\InvalidArgumentException

@param int $pid

@return bool
Check whether a pid is running .