call waitpid until no more children to wait for (thanks Devin/dlab).
simonb simonb
2 files changed,
6 insertions(+),
1 deletions(-)
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -1135,7 +1135,8 @@ static int re_enter = 0;
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();