From 9eedf5f08771ff04a51765c5cd81b65d62794060 Mon Sep 17 00:00:00 2001 From: Jethro Grassie Date: Sat, 8 Dec 2018 20:52:54 -0500 Subject: [PATCH] ignore child process when exec --- src/common/spawn.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/spawn.cpp b/src/common/spawn.cpp index 0a2ce8387..b2d03f62f 100644 --- a/src/common/spawn.cpp +++ b/src/common/spawn.cpp @@ -35,6 +35,7 @@ #include #else #include +#include #endif #include "misc_log_ex.h" @@ -114,7 +115,10 @@ int spawn(const char *filename, const std::vector& args, bool wait) if (pid > 0) { if (!wait) + { + signal(SIGCHLD, SIG_IGN); return 0; + } while (1) {