4 releases
Uses old Rust 2015
0.1.3 | Dec 16, 2017 |
---|---|
0.1.2 | Jul 1, 2017 |
0.1.1 | Jul 1, 2017 |
0.1.0 | Jul 1, 2017 |
#673 in Operating systems
83 downloads per month
Used in 2 crates
9KB
204 lines
signal-notify
crate provides a simple way to wait for signals in *nix systems through standard
std::sync::mpsc
API.
use signal_notify::{notify, Signal};
let rx = notify(&[Signal::INT, Signal::HUP]);
// block unitl receiving SIGINT or SIGHUP.
// recv always return Ok because the sender channel will be never closed.
rx.recv().unwrap()
signal-notify
doesn't support Windows. I'm not familiar with Windows, so I'd be happy if you
could help me about it.
lib.rs
:
signal-notify
crate provides a simple way to wait for signals in *nix systems through standard
std::sync::mpsc
API.
use signal_notify::{notify, Signal};
let rx = notify(&[Signal::INT, Signal::HUP]);
// block unitl receiving SIGINT or SIGHUP.
// recv always return Ok because the sender channel will be never closed.
rx.recv().unwrap();
signal-notify
doesn't support Windows. I'm not familiar with Windows, so I'd be happy if you
could help me about it.
Dependencies
~52KB