Skip to main content

is_interrupted

Function is_interrupted 

Source
pub fn is_interrupted() -> bool
Expand description

Returns true if Ctrl+C was pressed, and clears the flag.

Commands that loop (e.g. top, watch) should call this each iteration to support cancellation.