13
0

possible fix for no-shutdown of external app (ie harvid)

This commit is contained in:
Robin Gareus 2013-06-07 16:43:41 +02:00
parent b13c5bff54
commit 1053529e4f

View File

@ -444,10 +444,13 @@ SystemExec::wait (int options)
int status=0;
if (pid==0) return -1;
if (pid==::waitpid(pid, &status, options)) {
pid=0;
}
if (errno == ECHILD) {
pid=0;
if (WEXITSTATUS(status) || WIFSIGNALED(status)) {
pid=0;
}
} else {
if (errno == ECHILD) {
pid=0;
}
}
return status;
}