public function kill($signal = SIGKILL)
    {
        if (!$this->getPid()) {
            throw new ResqueRuntimeException(
                'Cannot kill a process with out a pid set'
            );
        }

        //TODO: needs logger
        //$this->getLogger()->notice('Sending {signal} to process {pid}', array('signal'=>$signal, 'pid'=>$this->getPid()));

        // @todo Work out if I care to check the result, and if I did what to do about it... Exception?
        posix_kill($this->getPid(), $signal);

        $this->pid = null;

        return $this;
    }
public function kill($signal = SIGKILL)
    {
        if (!$this->getPid()) {
            throw new ResqueRuntimeException(
                'Cannot kill a process with out a pid set'
            );
        }

        //TODO: needs logger
        //$this->getLogger()->notice('Sending {signal} to process {pid}', array('signal'=>$signal, 'pid'=>$this->getPid()));

        // @todo Work out if I care to check the result, and if I did what to do about it... Exception?
        posix_kill($this->getPid(), $signal);

        $this->pid = null;

        return $this;
    }
public function kill ( $ signal = SIGKILL ) { if ( ! $ this -> getPid ( ) ) { throw new ResqueRuntimeException ( 'Cannot kill a process with out a pid set' ) ; } //TODO: needs logger //$this->getLogger()->notice('Sending {signal} to process {pid}', array('signal'=>$signal, 'pid'=>$this->getPid())); // @todo Work out if I care to check the result, and if I did what to do about it... Exception? posix_kill ( $ this -> getPid ( ) , $ signal ) ; $ this -> pid = null ; return $ this ; }
Attempt to kill the process

@param int $signal The signal to send to the process
@return $this
Attempt to kill the process