protected function getRunningPid()
    {
        if (!file_exists($this->pidFilePath)) {
            return;
        }

        $pid = intval(trim(file_get_contents($this->pidFilePath)));

        if($this->processControl->isRunning($pid, true)) {
            return $pid;
        }

        // Not found, remove the stale PID file
        unlink($this->pidFilePath);
    }
protected function getRunningPid()
    {
        if (!file_exists($this->pidFilePath)) {
            return;
        }

        $pid = intval(trim(file_get_contents($this->pidFilePath)));

        if($this->processControl->isRunning($pid, true)) {
            return $pid;
        }

        // Not found, remove the stale PID file
        unlink($this->pidFilePath);
    }
protected function getRunningPid ( ) { if ( ! file_exists ( $ this -> pidFilePath ) ) { return ; } $ pid = intval ( trim ( file_get_contents ( $ this -> pidFilePath ) ) ) ; if ( $ this -> processControl -> isRunning ( $ pid , true ) ) { return $ pid ; } // Not found, remove the stale PID file unlink ( $ this -> pidFilePath ) ; }
Check if there is a running daemon

@return int|null
Check if there is a running daemon