Skip to main content

spawn_double_interrupt_force_exit

Function spawn_double_interrupt_force_exit 

Source
pub fn spawn_double_interrupt_force_exit() -> JoinHandle<()> ⓘ
Expand description

Install a process-wide second-SIGINT force-exit watcher.

First SIGINT is handled cooperatively by wait_for_cancel / crate::shutdown::race_op_with_cancel_and_deadline. A second SIGINT within DOUBLE_INTERRUPT_FORCE_SECS flushes stdio and exits 130. Returns a join handle so callers may abort it after a clean finish (optional).