Skip to main content

SHELL_INTERRUPTED

Static SHELL_INTERRUPTED 

Source
pub static SHELL_INTERRUPTED: AtomicBool
Expand description

Global flag set by Ctrl+C. Long-running commands should poll this via is_interrupted and abort early when it returns true.

ยงCooperative cancellation contract

Any command that loops, polls, or performs a multi-step sequence MUST call is_interrupted() at least once per iteration and return promptly when it signals true. This ensures the user can always break out with Ctrl+C.

Commands that already check keyboard input directly (e.g. top, silo attach) are exempt as long as they recognize Ctrl+C (0x03).