summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--syslogd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/syslogd.c b/syslogd.c
index a40930b0..dae93362 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -3287,7 +3287,7 @@ static void reapchild()
{
int saved_errno = errno;
signal(SIGCHLD, reapchild); /* reset signal handler -ASP */
- wait(NULL);
+ while(waitpid(-1, NULL, WNOHANG) > 0);
errno = saved_errno;
}