From ce20cdef23e5d2dfae99a3352bff4aa1bf39919a Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 27 Jul 2007 19:28:25 +0000 Subject: Child proc fix git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3576 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Component.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/Component.py') diff --git a/src/lib/Component.py b/src/lib/Component.py index 5bf61452c..a6f3e9aa2 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -254,8 +254,12 @@ class Component(TLSServer, while True: try: pid = os.waitpid(0, os.WNOHANG)[0] - self.children.remove(pid) - self.logger.debug("process %d exited" % pid) + if pid: + self.logger.debug("process %d exited" % pid) + if pid in self.children: + self.children.remove(pid) + else: + break except OSError: break if len(self.children) >= self.child_limit: -- cgit v1.2.3-1-g7c22