我看了你之前回到的代码,有个地方我感觉有点疑问。 function stopAll($sig){ echo "master has a sig $sig\n" ; } $master_id = getmypid(); $pid = pcntl_fork(); if($pid > 0) { pcntl_signal(SIGINT,'stopAll') ; $epid = pcntl_w...
protected static function monitorWorkers() { self::$_status = self::STATUS_RUNNING; while (1) { // Calls signal handlers for pending signals. pcntl_signal_dispatch();...