diff --git a/lib/base/process.cpp b/lib/base/process.cpp index d4246a6b223..a076dcf32d8 100644 --- a/lib/base/process.cpp +++ b/lib/base/process.cpp @@ -19,6 +19,7 @@ #ifndef _WIN32 # include # include +# include # include # ifndef __APPLE__ @@ -170,6 +171,17 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques } #endif /* HAVE_NICE */ + { + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + + sa.sa_handler = SIG_DFL; + + for (int sig = 1; sig <= 31; ++sig) { + (void)sigaction(sig, &sa, nullptr); + } + } + sigset_t mask; sigemptyset(&mask); sigprocmask(SIG_SETMASK, &mask, nullptr);