private function killTask(Task $task) { if ($task instanceof Process) { $stdout = $this->getStdOut(); $stderr = $this->getStdErr(); $this->getShell()->exec("kill -9 %s {$stdout} {$stderr} &", [$task->getId()]); return true; } return false; }