mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
gspawn: Reset signal handlers for synchronous spawning
We should by default reset signal handlers; particularly with the ability to install them via g_unix_signal_source_new(), we don't want to call a user callback inside a fork()ed helper process. https://bugzilla.gnome.org/show_bug.cgi?id=652072
This commit is contained in:
parent
b9c67b4369
commit
1874ad97d8
@ -1238,6 +1238,12 @@ fork_exec_with_pipes (gboolean intermediate_child,
|
||||
/* Immediate child. This may or may not be the child that
|
||||
* actually execs the new process.
|
||||
*/
|
||||
|
||||
/* Reset some signal handlers that we may use */
|
||||
signal (SIGCHLD, SIG_DFL);
|
||||
signal (SIGINT, SIG_DFL);
|
||||
signal (SIGTERM, SIG_DFL);
|
||||
signal (SIGHUP, SIG_DFL);
|
||||
|
||||
/* Be sure we crash if the parent exits
|
||||
* and we write to the err_report_pipe
|
||||
|
Loading…
Reference in New Issue
Block a user