Merge pull request #4960

b56b5b5 ignore child process when exec (jtgrassie)
This commit is contained in:
luigi1111 2018-12-31 16:32:12 -06:00
commit e344d93ce7
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 4 additions and 0 deletions

View File

@ -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)
{