diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 1998-05-19 03:31:51 +0000 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 1998-05-19 03:31:51 +0000 |
commit | 233588d442d23a499af3fe383ca500ffc0cd7604 (patch) | |
tree | 118bb93a78b97abcc749ec86a39b725998f9c8d1 /logging.c | |
parent | fc74eb9d17501af25469eb42f23f81a018abe411 (diff) | |
download | sudo-233588d442d23a499af3fe383ca500ffc0cd7604.tar.gz |
used waitpid or wait3 if we have 'em
Diffstat (limited to 'logging.c')
-rw-r--r-- | logging.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -536,9 +536,15 @@ static void send_mail() static RETSIGTYPE reapchild(sig) int sig; { - int save_errno = errno; + int pid, status, save_errno = errno; +#ifdef sudo_waitpid + do { + pid = sudo_waitpid(-1, &status, WNOHANG); + } while (pid == -1); +#else (void) wait(NULL); +#endif #ifndef POSIX_SIGNALS (void) signal(SIGCHLD, reapchild); #endif /* POSIX_SIGNALS */ |