smol-rs / async-signal

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

Should we disable the default signal handler when we register it? #3

Closed notgull closed 1 year ago

notgull commented 1 year ago

Right now, when a signal is registered via the Signals type, the default signal handler is disabled. This requires the user to manually call the low-level signal handler. This is probably what's desired for most cases, like handling SIGINT, since the default signal handler for SIGINT ends the application. However, for other signals, it may be desired to call the default signal handler. I think there should be an option in add_signals or other to call the default signal handler on receipt.

notgull commented 1 year ago

Actually, this might be the only real way of doing it.