ignore child process when exec

This commit is contained in:
Jethro Grassie 2018-12-08 20:52:54 -05:00 committed by moneromooo-monero
parent 5f89caea90
commit 34d2850fac
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

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