# HG changeset patch # User Luke Schierer # Date 1036360745 0 # Node ID 271ca53950e633d9b8b997e58a2578f911728a96 # Parent 811329c423ca1b0e3c5b57e589df49e027a26b68 [gaim-migrate @ 4042] reap ALL children who are done instead of a single child. we used to do this before sean removed the child-reaper jseymour and i worked out. thanks Paco-Paco committer: Tailor Script diff -r 811329c423ca -r 271ca53950e6 src/util.c --- a/src/util.c Sun Nov 03 17:59:27 2002 +0000 +++ b/src/util.c Sun Nov 03 21:59:05 2002 +0000 @@ -648,8 +648,10 @@ int status; pid_t pid; - pid = waitpid(-1, &status, 0); - if(pid < 0 && errno != ECHILD) { + do { + pid = waitpid(-1, &status, WNOHANG); + } while (pid > 0); + if(pid == (pid_t)-1 && errno != ECHILD) { char errmsg[BUFSIZ]; sprintf(errmsg, "Warning: waitpid() returned %d", pid); perror(errmsg);