protected function sendSignal($signalNumber)
    {
        if (! $this->context->isRunning || ! $this->context->processId) {
            return false;
        }

        $result = $this->control->signal()->send($signalNumber, $this->context->processId);
        if (in_array($signalNumber, [SIGTERM, SIGKILL])) {
            $this->context->isRunning = false;
            $this->context->processId = null;
        }

        return $result;
    }
protected function sendSignal($signalNumber)
    {
        if (! $this->context->isRunning || ! $this->context->processId) {
            return false;
        }

        $result = $this->control->signal()->send($signalNumber, $this->context->processId);
        if (in_array($signalNumber, [SIGTERM, SIGKILL])) {
            $this->context->isRunning = false;
            $this->context->processId = null;
        }

        return $result;
    }
protected function sendSignal ( $ signalNumber ) { if ( ! $ this -> context -> isRunning || ! $ this -> context -> processId ) { return false ; } $ result = $ this -> control -> signal ( ) -> send ( $ signalNumber , $ this -> context -> processId ) ; if ( in_array ( $ signalNumber , [ SIGTERM , SIGKILL ] ) ) { $ this -> context -> isRunning = false ; $ this -> context -> processId = null ; } return $ result ; }
Sends a signal to the current process and returns its results.

@param int $signalNumber

@return bool
Sends a signal to the current process and returns its results .