Skip to main content

Module interrupt

Module interrupt 

Source
Expand description

SIGINT → “break into the debugger at the next iteration”. A first Ctrl-C sets a pending flag the hook consumes at the next checkpoint; a second Ctrl-C before that (or any Ctrl-C once detached) hard-exits, preserving the usual “abort” escape hatch.

At a rustyline prompt the terminal is in raw mode, so Ctrl-C arrives as input (handled as Interrupted) rather than as SIGINT — this handler only fires while the solve is running. The prompt has its own analogous double-tap: the first Ctrl-C cancels the line, a second quits the solve (see SolverDebugger::on_prompt_interrupt).

Functions§

install
Install the handler once (idempotent). Call only when a debugger is active, so a normal run keeps default Ctrl-C behavior.
take
Consume a pending break request (clears it).