summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tcpdump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcpdump.c b/tcpdump.c
index f092e161..b0d3aa5b 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -2836,7 +2836,7 @@ cleanup(int signo _U_)
static void
child_cleanup(int signo _U_)
{
- wait(NULL);
+ while (waitpid(-1, NULL, WNOHANG) >= 0);
}
#endif /* HAVE_FORK && HAVE_VFORK */