/** * Signal handler for master process * * @param integer Signal number * @return void */ public function __signalHandler($signo) { $this->_debug("-----> " . __CLASS__ . '::' . __FUNCTION__ . "({$signo})", 9); switch ($signo) { case SIGUSR1: $this->_debug("Caught SIGUSR1, polling the children for IPC messages..."); $this->_ipc_pollWorkers(); break; case SIGCHLD: $this->_debug("Caught SIGCHLD, polling the children for exit statuses..."); $this->_mp_pollWorkers_forExit(); break; case SIGTERM: $this->_debug("Caught SIGTERM, running shutdown method..."); $this->___parent->__exit(); break; case SIGINT: $this->_debug("Caught SIGINT, running shutdown method..."); $this->___parent->__exit(); break; default: $this->___parent->__log("Caught unknown signal {$signo}, running shitdown method..."); $this->_exit(); } }