public function isProcessRunning(bool $throwsException = false): bool
    {
        $running = false;
        try {
            $pid = $this->getPid();
            $isRunning = $this->process->isRunning($pid);
            if ($isRunning) {
                $this->logger->debug("Pid '${pid}' running.");
                $running = true;
            } else {
                $this->logger->debug("Pid '${pid}' not running.");
            }
        } catch (Exception\PidNotFoundException $e) {
            if ($throwsException) {
                throw $e;
            }
        }

        return $running;
    }
public function isProcessRunning(bool $throwsException = false): bool
    {
        $running = false;
        try {
            $pid = $this->getPid();
            $isRunning = $this->process->isRunning($pid);
            if ($isRunning) {
                $this->logger->debug("Pid '${pid}' running.");
                $running = true;
            } else {
                $this->logger->debug("Pid '${pid}' not running.");
            }
        } catch (Exception\PidNotFoundException $e) {
            if ($throwsException) {
                throw $e;
            }
        }

        return $running;
    }
public function isProcessRunning ( bool $ throwsException = false ) : bool { $ running = false ; try { $ pid = $ this -> getPid ( ) ; $ isRunning = $ this -> process -> isRunning ( $ pid ) ; if ( $ isRunning ) { $ this -> logger -> debug ( "Pid '${pid}' running." ) ; $ running = true ; } else { $ this -> logger -> debug ( "Pid '${pid}' not running." ) ; } } catch ( Exception \ PidNotFoundException $ e ) { if ( $ throwsException ) { throw $ e ; } } return $ running ; }
Test whether the standalone server process
is effectively running.

@throws Exception\PidNotFoundException

@param bool $throwsException if false discard exception if pidfile not exists
Test whether the standalone server process is effectively running .