diff options
author | Jethro Grassie <jtg@xtrabass.com> | 2018-12-08 20:52:54 -0500 |
---|---|---|
committer | Jethro Grassie <jtg@xtrabass.com> | 2018-12-08 20:52:54 -0500 |
commit | b56b5b52eb47ab1ad67de1cd09f8af1eff1c882d (patch) | |
tree | a20b5a118624ef464f8e69d6026e77c3eea5367f /src/common/spawn.cpp | |
parent | Merge pull request #4879 (diff) | |
download | monero-b56b5b52eb47ab1ad67de1cd09f8af1eff1c882d.tar.xz |
ignore child process when exec
Diffstat (limited to '')
-rw-r--r-- | src/common/spawn.cpp | 4 |
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) { |