diff options
author | pixel <pixel> | 2007-12-20 23:20:46 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-12-20 23:20:46 +0000 |
commit | 260366ea670a66a99da6f3a0a85897d306ddc4c0 (patch) | |
tree | a47b6cd71803a7521fa5c8b2218eced55cf83a88 /lib/TaskMan.cc | |
parent | 0dfefdd04e794daa4a163dc791f340467da80df3 (diff) |
Fixing endless loop...
Diffstat (limited to 'lib/TaskMan.cc')
-rw-r--r-- | lib/TaskMan.cc | 4 |
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 { |