protected function catchSignal(): self
    {
        pcntl_async_signals(true);
        pcntl_signal(SIGTERM, [$this, 'cleanup']);
        pcntl_signal(SIGINT, [$this, 'cleanup']);
        pcntl_signal(SIGALRM, [$this, 'timeout']);

        return $this;
    }
protected function catchSignal(): self
    {
        pcntl_async_signals(true);
        pcntl_signal(SIGTERM, [$this, 'cleanup']);
        pcntl_signal(SIGINT, [$this, 'cleanup']);
        pcntl_signal(SIGALRM, [$this, 'timeout']);

        return $this;
    }
protected function catchSignal ( ) : self { pcntl_async_signals ( true ) ; pcntl_signal ( SIGTERM , [ $ this , 'cleanup' ] ) ; pcntl_signal ( SIGINT , [ $ this , 'cleanup' ] ) ; pcntl_signal ( SIGALRM , [ $ this , 'timeout' ] ) ; return $ this ; }
Catch signals and cleanup.
Catch signals and cleanup .