pcntl_signal_get_handler

Supported Versions: PHP 7 >= 7.1.0, PHP 8
Get the current handler for specified signal
<?php pcntl_signal_get_handler(int $signal): callable|int
<?php     protected function initializeSignal($signal)

    {

        return is_callable($existingHandler = pcntl_signal_get_handler($signal))

            ? [$existingHandler]

            : null;

    }