summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/TaskMan.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index 24bbf77..c83cf26 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: TaskMan.cc,v 1.48 2007-12-20 17:07:11 pixel Exp $ */
+/* $Id: TaskMan.cc,v 1.49 2007-12-20 23:20:46 pixel Exp $ */
#ifndef _WIN32
#include <signal.h>
@@ -74,6 +74,8 @@ void TaskMan::CleanChildren() {
while (1) {
pid = waitpid(-1, &status, WNOHANG);
+ if ((pid == 0) || (pid == -1))
+ break;
if (GotChild(pid, status)) {
got_sigchild++;
} else {