aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-12-31 16:32:12 -0600
committerluigi1111 <luigi1111w@gmail.com>2018-12-31 16:32:12 -0600
commite344d93ce706482fc55bb036051dc08da18fabbb (patch)
treece8f9292a59c0ffcb483d46030cc36d68bcdb428 /src/common
parent53760ee044f058920c05c466a3932ae520a9e24f (diff)
parentb56b5b52eb47ab1ad67de1cd09f8af1eff1c882d (diff)
downloadmonzero-core-e344d93ce706482fc55bb036051dc08da18fabbb.tar.gz
monzero-core-e344d93ce706482fc55bb036051dc08da18fabbb.tar.xz
monzero-core-e344d93ce706482fc55bb036051dc08da18fabbb.zip
Merge pull request #4960
b56b5b5 ignore child process when exec (jtgrassie)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/spawn.cpp4
1 files changed, 4 insertions, 0 deletions
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 <windows.h>
#else
#include <sys/wait.h>
+#include <signal.h>
#endif
#include "misc_log_ex.h"
@@ -114,7 +115,10 @@ int spawn(const char *filename, const std::vector<std::string>& args, bool wait)
if (pid > 0)
{
if (!wait)
+ {
+ signal(SIGCHLD, SIG_IGN);
return 0;
+ }
while (1)
{