pcntl_async_signals

Supported Versions: PHP 7 >= 7.1.0, PHP 8
Enable/disable asynchronous signal handling or return the old setting
pcntl_async_signals(?bool $enable null): bool
    protected function listenForSignals()

    {

        
pcntl_async_signals(true);



        
pcntl_signal(SIGTERM, function () {

            
$this->shouldQuit true;