From 51fa41554e87a50d1ded65382a645c9c47f2194f Mon Sep 17 00:00:00 2001 From: simonb Date: Mon, 3 Jul 2006 01:56:59 +0000 Subject: call waitpid until no more children to wait for (thanks Devin/dlab). --- ChangeLog | 4 ++++ src/fluxbox.cc | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a59d93c..03c7df2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0rc2: +*06/07/03: + * call waitpid() on SIGCHLD until no more children (thanks Devin/dlab) + sf.net #1514843, #1447782 - fluxbox leaves zombies + fluxbox.cc *06/07/02: * Updated documentation (Mark) *06/06/29: diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1cdc647..4e4187a 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -1135,7 +1135,8 @@ void Fluxbox::handleSignal(int signum) { switch (signum) { case SIGCHLD: // we don't want the child process to kill us - waitpid(-1, 0, WNOHANG | WUNTRACED); + // more than one process may have terminated + while (waitpid(-1, 0, WNOHANG | WUNTRACED) > 0); break; case SIGHUP: restart(); -- cgit v0.11.2