diff options
-rw-r--r-- | src/misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -136,6 +136,14 @@ static void fork_exec_child_setup(gpointer data) { #ifndef _WIN32 setsid(); + + /* Unblock all signals and leave our exec()-ee to block what it wants */ + sigset_t ss; + sigemptyset(&ss); + sigprocmask(SIG_SETMASK, &ss, NULL); + + /* POSIX is obnoxious about SIGCHLD specifically across exec() */ + signal(SIGCHLD, SIG_DFL); #endif } |