public static function unregister(?array $signals = null): void
    {
        if (empty($signals)) {
            $signals = self::KNOWN_SIGNALS;
        }

        foreach ($signals as $signal) {
            if (is_string($signal)) {
                // skip missing signals, for example OSX does not have all signals
                if (!defined($signal)) {
                    continue;
                }

                $signal = constant($signal);
            }

            pcntl_signal($signal, SIG_DFL);
        }
    }