Merge pull request #370 from toke/bugfix/upstream-369

Prevent zombie apocalypse by ignoring SIGCHLD
This commit is contained in:
Alex 2019-06-06 12:07:03 +02:00 committed by GitHub
commit f04ff38567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;