4d79dc5 docs, LICENSE and cargo meta
~jpastuszek pushed to ~jpastuszek/uninterruptible git
cbba8ad (cargo-release) start next development iteration 0.1.0
~jpastuszek pushed to ~jpastuszek/uninterruptible git
Guard type that keeps selected Unix signals suppressed.
use uninterruptible::Uninterruptible;
// catch terminate signals (SIGTERM, SIGQUIT, SIGINT)
let u = Uninterruptible::terminate()?;
// do work, e.g. call in sub-process
u.checkpoint()?; // fails if the process recived one of the terminate signals (e.g. CTRL-C was pressed)
drop(u); // revert to default signal handlers
See module level documentation on docs.rs for more examples.