Function register_signal_handler

Source
pub unsafe fn register_signal_handler(
    num: c_int,
    handler: extern "C" fn(c_int),
) -> Result<()>
Expand description

Registers handler as the signal handler of signum num.

ยงSafety

This is considered unsafe because the given handler will be called asynchronously, interrupting whatever the thread was doing and therefore must only do async-signal-safe operations.