You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in #78, the current situation in which a library may „steal“ a signal that usually has a default handler can be undesirable. This should be something that is controlled by the application.
The proposed solution is to initialize signals explicitly. The application would call something like init_signal(SIGTERM, SigConfig::default()). That would take over the signal handler, allow libraries to hook into it and say how the library should deal with default handler (emulate it always ‒ see #81, get rid of it, call it if there are no hooks...).
We also need some backwards-compatible way to make the initialization mandatory ‒ registration would error out if that didn't happen.
However, certain libraries already take advantage of this implicit takeover (I've seen multiple async runtimes to do so for SIGCHLD). Possibly the way forward is to allow implicit initialization for signals that have an empty default signal handler (because then the takeover has no effect on the behaviour).
The text was updated successfully, but these errors were encountered:
As discussed in #78, the current situation in which a library may „steal“ a signal that usually has a default handler can be undesirable. This should be something that is controlled by the application.
The proposed solution is to initialize signals explicitly. The application would call something like
init_signal(SIGTERM, SigConfig::default())
. That would take over the signal handler, allow libraries to hook into it and say how the library should deal with default handler (emulate it always ‒ see #81, get rid of it, call it if there are no hooks...).We also need some backwards-compatible way to make the initialization mandatory ‒ registration would error out if that didn't happen.
However, certain libraries already take advantage of this implicit takeover (I've seen multiple async runtimes to do so for SIGCHLD). Possibly the way forward is to allow implicit initialization for signals that have an empty default signal handler (because then the takeover has no effect on the behaviour).
The text was updated successfully, but these errors were encountered: