protected function register_ticks($parent=true) {

        if ($parent) {
            $this->log("Registering signals for parent", GearmanManager::LOG_LEVEL_DEBUG);
            pcntl_signal(SIGTERM, array($this, "signal"));
            pcntl_signal(SIGINT,  array($this, "signal"));
            pcntl_signal(SIGUSR1,  array($this, "signal"));
            pcntl_signal(SIGUSR2,  array($this, "signal"));
            pcntl_signal(SIGCONT,  array($this, "signal"));
            pcntl_signal(SIGHUP,  array($this, "signal"));
        } else {
            $this->log("Registering signals for child", GearmanManager::LOG_LEVEL_DEBUG);
            $res = pcntl_signal(SIGTERM, array($this, "signal"));
            if (!$res) {
                exit();
            }
        }
    }
protected function register_ticks($parent=true) {

        if ($parent) {
            $this->log("Registering signals for parent", GearmanManager::LOG_LEVEL_DEBUG);
            pcntl_signal(SIGTERM, array($this, "signal"));
            pcntl_signal(SIGINT,  array($this, "signal"));
            pcntl_signal(SIGUSR1,  array($this, "signal"));
            pcntl_signal(SIGUSR2,  array($this, "signal"));
            pcntl_signal(SIGCONT,  array($this, "signal"));
            pcntl_signal(SIGHUP,  array($this, "signal"));
        } else {
            $this->log("Registering signals for child", GearmanManager::LOG_LEVEL_DEBUG);
            $res = pcntl_signal(SIGTERM, array($this, "signal"));
            if (!$res) {
                exit();
            }
        }
    }
protected function register_ticks ( $ parent = true ) { if ( $ parent ) { $ this -> log ( "Registering signals for parent" , GearmanManager :: LOG_LEVEL_DEBUG ) ; pcntl_signal ( SIGTERM , array ( $ this , "signal" ) ) ; pcntl_signal ( SIGINT , array ( $ this , "signal" ) ) ; pcntl_signal ( SIGUSR1 , array ( $ this , "signal" ) ) ; pcntl_signal ( SIGUSR2 , array ( $ this , "signal" ) ) ; pcntl_signal ( SIGCONT , array ( $ this , "signal" ) ) ; pcntl_signal ( SIGHUP , array ( $ this , "signal" ) ) ; } else { $ this -> log ( "Registering signals for child" , GearmanManager :: LOG_LEVEL_DEBUG ) ; $ res = pcntl_signal ( SIGTERM , array ( $ this , "signal" ) ) ; if ( ! $ res ) { exit ( ) ; } } }
Registers the process signal listeners
Registers the process signal listeners