diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-01-20 17:23:18 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-01-20 17:23:18 +0000 |
commit | 72654d84113c8b241028342b1b79d70220ff92bd (patch) | |
tree | 5978d3ecf0b313ceab12207ba8dcb399ceb13855 | |
parent | bacb71f1c3ed5f40e393afd8be81bedfba13a401 (diff) | |
parent | eee9db9d115d91aa82f33685c4e76d656db92976 (diff) | |
download | slirp-72654d84113c8b241028342b1b79d70220ff92bd.zip slirp-72654d84113c8b241028342b1b79d70220ff92bd.tar.gz slirp-72654d84113c8b241028342b1b79d70220ff92bd.tar.bz2 |
Merge branch 'master' into 'master'
fork_exec_child_setup: improve signal handling
See merge request slirp/libslirp!61
-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 } |