[PATCH] gmain: Reset signal handlers to default when source is
@walters
Submitted by Colin Walters Link to original bug (#704699)
Description
If someone creates a unix signal source for e.g. SIGINT, and then removes it, reset the handler to SIG_DFL.
Not doing this was the source of race conditions in the glib/tests/unix test, but this will also just make us a "good citizen" by cleaning up.
For example, if a project temporarily creates a handler for SIGTERM, and then later removes it, they almost certainly want SIGTERM to revert to the default of terminating the process, rather than doing nothing.
glib/gmain.c | 51 +++++++++++++++++++++++++++++++-------------------- glib/tests/unix.c | 11 ++++------- 2 files changed, 35 insertions(+), 27 deletions(-)