Crate uninterruptible

Source
Expand description

Guard type that keeps selected Unix signals suppressed.

use uninterruptible::Uninterruptible;

// catch terminate signals (SIGTERM, SIGQUIT, SIGINT)
let u = Uninterruptible::terminate().unwrap();

// do work, e.g. call in sub-process

u.checkpoint().unwrap(); // fails if the process recived one of the terminate signals (e.g. CTRL-C was pressed)


drop(u); // revert to default signal handlers

Modules§

signal
The signal constants.

Structs§

Uninterruptible
Guard type that keeps selected signals suppressed.

Constants§

TERM_SIGNALS
Various signals commonly requesting shutdown of an application.