protected function listenForSignals()
    {
        pcntl_async_signals(true);

        pcntl_signal(SIGTERM, function () {
            $this->shouldQuit = true;
        });

        pcntl_signal(SIGUSR2, function () {
            $this->paused = true;
        });

        pcntl_signal(SIGCONT, function () {
            $this->paused = false;
        });
    }
protected function listenForSignals()
    {
        pcntl_async_signals(true);

        pcntl_signal(SIGTERM, function () {
            $this->shouldQuit = true;
        });

        pcntl_signal(SIGUSR2, function () {
            $this->paused = true;
        });

        pcntl_signal(SIGCONT, function () {
            $this->paused = false;
        });
    }
protected function listenForSignals ( ) { pcntl_async_signals ( true ) ; pcntl_signal ( SIGTERM , function ( ) { $ this -> shouldQuit = true ; } ) ; pcntl_signal ( SIGUSR2 , function ( ) { $ this -> paused = true ; } ) ; pcntl_signal ( SIGCONT , function ( ) { $ this -> paused = false ; } ) ; }
Enable async signals for the process.

@return void
Enable async signals for the process .