-
Notifications
You must be signed in to change notification settings - Fork 733
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
Proposal: move Mio-signals into Mio #1355
Comments
This is definitely an interesting proposal. I've been looking at wiring up event ports in Mio (for illumos, where epoll works, but event ports is the "more native" OS facility). Like kqueue, it supports port notifications for signals. In addition to that, it can subscribe to events from timers, message queues, and filesystem events. If Mio-signal is to be rolled into Mio, it might be a good opportunity to look at the Thoughts? |
I'm open to expanding |
Since Mio-signals still hasn't got Windows support I'm going to close this. It can live in a separate crate for now and can always be added after v1. |
The Mio-signals crate provides a cross-platform way to handle process signals without having to setup signal handlers. Instead you can receive a
mio::Event
, which tells you to check theSignals
type for received process signals. And all of this can be done without spawning any additional threads. On OSes withkqueue(2)
it usesEVFILT_SIGNAL
, on Linuxsignalfd(2)
. The current set of supported signals is slim, SIGINT, SIGTERM and SIGQUIT, but that could be expanded.One disadvantage is that it doesn't have Windows support, supporting is being tracked in Thomasdezeeuw/mio-signals#4. Current idea is to use a NamedPipe, but I never got around to testing that idea.
Source: https://github.com/Thomasdezeeuw/mio-signals
Docs: https://docs.rs/mio-signals/0.1.2/mio_signals/
The text was updated successfully, but these errors were encountered: