pcntl_async_signals

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

    {

        pcntl_async_signals(true);



        pcntl_signal(SIGQUIT, fn () => $this->shouldQuit = true);

        pcntl_signal(SIGTERM, fn () => $this->shouldQuit = true);