public function testException() { $this->setExpectedException('\\Ark4ne\\Processes\\Exception\\ProcessNullPIDException'); new Process(0); $this->setExpectedException('\\Ark4ne\\Processes\\Exception\\ProcessNullPIDException'); new Process(null); $process = new Process(1); $process->setPid(0); System::kill($process); Manager::os()->kill($process); }
/** * Kill the process. * * @param Process $process * * @return string */ public function kill(Process $process) { return exec("taskkill /F /PID {$process->getPid()}"); }
/** * Kill the process. * * @param Process $process * * @return mixed */ public function kill(Process $process) { return exec("kill -9 {$process->getPid()}"); }