summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfxlb <devel.fx.lebail@orange.fr>2023-04-19 09:52:25 +0000
committerGitHub <noreply@github.com>2023-04-19 09:52:25 +0000
commit541c1ab5e795684abb3e3b372a68055404190a1a (patch)
treecd39c78b8f845185971286e09464050d123d7e53
parent89b68e1a5fe131951858d7bcf71587ad7fa25846 (diff)
parentb5f0be2196d897c76144a5b90b168836df54d6fa (diff)
downloadtcpdump-541c1ab5e795684abb3e3b372a68055404190a1a.tar.gz
Merge pull request #972 from martinetd/zombie
child_cleanup: reap as many child processes as possible
-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 */