smol-rs / async-signal

Asynchronous signal handling
Apache License 2.0
15 stars 6 forks source link

Windows Support #1

Closed notgull closed 1 year ago

notgull commented 1 year ago

Windows supports signals as well (albeit a significantly smaller set than what Unix supports). It would be good to support those signals here.

However, the current notification (an asynchronous pipe) isn't supported by async-io yet. We could either use Windows UDS sockets, which would work out of the box in this case but aren't available on older versions of Windows, or we could work named pipes into async-io/polling, which would be harder but also open up more opportunities.

notgull commented 1 year ago

Turns out Windows just spawns a thread to handle Ctrl-C signals, which makes the implementation here a lot easier.