Jenner\SimpleFork\Process::shutdown PHP Метод

shutdown() публичный Метод

kill self
public shutdown ( boolean | true $block = true, integer $signal = SIGTERM )
$block boolean | true
$signal integer
    public function shutdown($block = true, $signal = SIGTERM)
    {
        if (empty($this->pid)) {
            throw new \LogicException('the process pid is null, so maybe the process is not started');
        }
        if (!$this->isRunning()) {
            throw new \LogicException("the process is not running");
        }
        if (!posix_kill($this->pid, $signal)) {
            throw new \RuntimeException("kill son process failed");
        }
        $this->updateStatus($block);
    }