In sigchild_handler(), finish with waitpid() before reinitializing

the SIGCHLD handling.
This commit is contained in:
Wayne Davison
2004-03-29 16:30:53 +00:00
parent be92ac6c36
commit cb984e620e

View File

@@ -431,10 +431,10 @@ int is_a_socket(int fd)
static RETSIGTYPE sigchld_handler(UNUSED(int val))
{
signal(SIGCHLD, sigchld_handler);
#ifdef WNOHANG
while (waitpid(-1, NULL, WNOHANG) > 0) {}
#endif
signal(SIGCHLD, sigchld_handler);
}