public function kill($signal = '', $waitForProcessToDisappear = false)
    {
        $pid = $this->getSupervisorPid();
        if (!empty($pid) && $this->isProcessRunning($pid)) {
            if (!empty($signal)) {
                $signal = sprintf('-%s', $signal);
            }

            $command = sprintf('kill %s %d', $signal, $pid);

            passthru($command);

            if ($waitForProcessToDisappear) {
                $this->wait();
            }
        }
    }
public function kill($signal = '', $waitForProcessToDisappear = false)
    {
        $pid = $this->getSupervisorPid();
        if (!empty($pid) && $this->isProcessRunning($pid)) {
            if (!empty($signal)) {
                $signal = sprintf('-%s', $signal);
            }

            $command = sprintf('kill %s %d', $signal, $pid);

            passthru($command);

            if ($waitForProcessToDisappear) {
                $this->wait();
            }
        }
    }
public function kill ( $ signal = '' , $ waitForProcessToDisappear = false ) { $ pid = $ this -> getSupervisorPid ( ) ; if ( ! empty ( $ pid ) && $ this -> isProcessRunning ( $ pid ) ) { if ( ! empty ( $ signal ) ) { $ signal = sprintf ( '-%s' , $ signal ) ; } $ command = sprintf ( 'kill %s %d' , $ signal , $ pid ) ; passthru ( $ command ) ; if ( $ waitForProcessToDisappear ) { $ this -> wait ( ) ; } } }
Send kill signal to supervisord

@param string $signal
@param bool $waitForProcessToDisappear
Send kill signal to supervisord