public function shutdown() { static $once = 0; if ($once++) { return; } foreach ($this->pids as $pid) { $this->terminateWorker($pid); } }