public function kill() { if (is_resource($this->process)) { // Forcefully kill the process using SIGKILL. proc_terminate($this->process, 9); // "Detach" from the process and let it die asynchronously. $this->process = null; } }
/** * {@inheritdoc} */ public function kill() { $this->process->kill(); $this->channel = null; }