public static function resetTrap()
    {
        if (!self::$registered) {
            throw new RuntimeException('Signal handler has not been registered');
        }
        if (!pcntl_signal_dispatch()) {
            throw new RuntimeException(
                sprintf('Call to pcntl_signal_dispatch() failed (PHP error: "%s")', @error_get_last()['message'])
            );
        }
        if (!pcntl_signal(SIGINT, SIG_DFL)) {
            throw new RuntimeException(
                sprintf(
                    'Could not relinquish control to PHP by registering default signal handler (PHP error: "%s")',
                    @error_get_last()['message']
                )
            );
        }

        self::$registered = false;
    }