public function __construct() { self::$_master_pid = posix_getpid(); // 产生时钟云,添加后父进程才可以收到信号 declare (ticks=1); $this->install_signal(); }
public function __construct() { // 注册进程退出回调,用来检查是否有错误 register_shutdown_function(array($this, 'check_errors')); self::$_master_pid = posix_getpid(); // 产生时钟云,添加后父进程才可以收到信号 declare (ticks=1); $this->install_signal(); }