Read as many signals on the signal pipe as we can before returning.

This commit is contained in:
Todd C. Miller
2010-09-10 11:27:20 -04:00
parent 59399d55c3
commit 66bea8c4c9

View File

@@ -350,6 +350,7 @@ handle_signals(int fd, pid_t child, int log_io, struct command_status *cstat)
int status;
pid_t pid;
for (;;) {
/* read signal pipe */
nread = read(signal_pipe[0], &signo, sizeof(signo));
if (nread <= 0) {
@@ -400,6 +401,7 @@ handle_signals(int fd, pid_t child, int log_io, struct command_status *cstat)
}
}
}
}
return 1;
}