-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use signal-hook-registry for listening to signals #97
Comments
Hi, thank you for your contribution. What is the use case where there would be multiple crates handing signals? This crate and Trying to be compatible with other crates doing signal handling feels a bit dangerous and error prone to me. I would rather "fix" this by implementing this TODO so that registering signals would fail if there's already a handler in place. |
There could be multiple crates in the dependency graph where one could use
On the contrary, it's actually less error prone to just use one universal crate for signal handling.
This would be an acceptable solution, since |
Fixed with release 3.3.0. |
this change makes my CLI break when I do the following in a bash script:
The error:
is this intended? or was this change only suppose to impact when a signal was caught within the same process? I suppose I can simply ignore the error but wanted to make sure this is working as expected. |
I think in that case the |
It is unsound to use this crate and
signal-hook
in the same dependency graph, since they will both try to acquire the signal handler and one will overwrite the other. This issue can be fixed by changing the signal handling backend to rely on thesignal-hook-registry
crate.The text was updated successfully, but these errors were encountered: