13 unstable releases
Uses old Rust 2015
0.7.0 | Aug 10, 2019 |
---|---|
0.6.0 | Jul 23, 2018 |
0.5.1 | Jun 1, 2018 |
0.4.1 | Aug 24, 2017 |
0.1.3 | Oct 19, 2015 |
#668 in Unix APIs
1,214 downloads per month
Used in 5 crates
(4 directly)
14KB
226 lines
Rust Signal
A higher-level library for handling unix signals. Currently more focused on writing process supervisors, but may be used (and extended) for other purposes too.
License
Licensed under either of
- Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
Signal handling library
The library is focused on higher-level abstractions for handling signals.
All low-level stuff should be in nix
.
Currently we have two mechanisms for handling exeptions:
- The
exec_handler
module for replacing process with newly runned command designed as crash safety measure - The
Trap
mechanism that masks out signals and allows wait for them explicitly
Both are specifically suited for making process supervisors.
Note, masking out signals may also be achieved by trap (just don't call
either wait()
or next()
)
On TODO list:
signalfd
The library tested only on linux
Dependencies
~1.5MB
~36K SLoC