Prevent zombie apocalypse by ignoring SIGCHLD

Fixes Issue #369
pull/370/head
Thomas Kerpe 2019-06-05 14:35:25 +02:00
parent 1962caf144
commit d20a586734
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,8 @@ inline int32_t forkExec(std::string cmd) {
setpgid(pid, pid);
execl("/bin/sh", "sh", "-c", cmd.c_str(), (char*)0);
exit(0);
} else {
signal(SIGCHLD,SIG_IGN);
}
return pid;