Skip to main content

install_shutdown_handler

Function install_shutdown_handler 

Source
pub fn install_shutdown_handler(shutdown: &Arc<AtomicBool>)
Expand description

Install SIGINT/SIGTERM handlers that flip shutdown on first signal and force-exit on the second. The caller must keep the Arc alive for the program’s lifetime — we publish its pointer to a signal-safe static so the handler can reach the flag.