Library for safe and correct Unix signal handling in Rust.
Unix signals are inherently hard to handle correctly, for several reasons:
This library aims to solve some of the problems. It provides a global registry of actions performed on arrival of signals. It is possible to register multiple actions for the same signal and it is possible to remove the actions later on. If there was a previous signal handler when the first action for a signal is registered, it is chained (but the original one can't be removed).
Besides the basic registration of an arbitrary action, several helper actions are provided to cover the needs of the most common use cases.
For further details, see the documentation.
Licensed under either of
at your option.
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.