Skip to main content

install_signal_handler

Function install_signal_handler 

Source
pub fn install_signal_handler(signum: c_int, handler: extern "C" fn(c_int))
Expand description

v1.39 — install a C-style handler for signum. Safe wrapper around signal(2); the handler must be async-signal-safe (no allocator, no syscall beyond a tiny set). Typical use: handler stores into a static AtomicBool which the main loop polls.