[][src]Function signal_hook::cleanup::cleanup_raw

pub fn cleanup_raw(signal: c_int) -> sighandler_t

Resets the signal handler to the default one.

This is the lowest level wrapper around resetting the signal handler to the OS default. It doesn't remove the hooks (though they will not get called), it doesn't handle errors and it doesn't return any previous chained signals. The hooks will simply stay registered but dormant.

This function is async-signal-safe. However, you might prefer to use either cleanup_signal or register.

Warning

This action is irreversible, once called, registering more hooks for the same signal will have no effect (neither the old nor the new ones will be active but the registration will appear to have succeeded).

This behaviour can change in future versions without considering it a breaking change.

In other words, this is expected to be called only before terminating the application and no further manipulation of the given signal is supported in any way. While it won't cause UB, it will produce unexpected results.