Skip to content

Commit

Permalink
mxqd: Fix return value of catchall()
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Jul 27, 2015
1 parent 4ca8a54 commit 8bf6183
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,15 +1434,16 @@ int catchall(struct mxq_server *server) {
res = waitid(P_ALL, 0, &siginfo, WEXITED|WNOHANG|WNOWAIT);

if (res == -1) {
/* no childs (left) => break loop */
if (errno == ECHILD)
return 0;
break;
mx_log_err("waitid: %m");
return 0;
}

/* no childs changed state => return */
/* no (more) childs changed state => break loop */
if (res == 0 && siginfo.si_pid == 0)
return 0;
break;

assert(siginfo.si_pid > 1);

Expand Down

0 comments on commit 8bf6183

Please sign in to comment.