Commit 029c1713 authored by Andrew Tridgell's avatar Andrew Tridgell

reap children in sigchld handler

parent 8f04bb36
...@@ -700,6 +700,9 @@ static RETSIGTYPE sigusr2_handler(int val) { ...@@ -700,6 +700,9 @@ static RETSIGTYPE sigusr2_handler(int val) {
} }
static RETSIGTYPE sigchld_handler(int val) { static RETSIGTYPE sigchld_handler(int val) {
#ifdef WNOHANG
while (waitpid(-1, NULL, WNOHANG) > 0) ;
#endif
} }
int main(int argc,char *argv[]) int main(int argc,char *argv[])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment