Return 0 only of child returned 0

This commit is contained in:
Jagger 2016-05-05 05:12:06 +02:00
parent 87f1883c69
commit 5bbfd06dcc

View File

@ -167,8 +167,9 @@ int subprocReap(struct nsjconf_t *nsjconf)
subprocRemove(nsjconf, si.si_pid);
LOG_I("PID: %d exited with status: %d, (PIDs left: %d)", si.si_pid,
WEXITSTATUS(status), subprocCount(nsjconf));
if (rv == 0) {
rv = WEXITSTATUS(status);
rv = WEXITSTATUS(status) % 100;
if (rv == 0 && WEXITSTATUS(status) != 0) {
rv = 1;
}
}
if (WIFSIGNALED(status)) {