summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-07-27 19:28:25 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-07-27 19:28:25 +0000
commitce20cdef23e5d2dfae99a3352bff4aa1bf39919a (patch)
treebec3c7470fde74c79e88135e6486080f0645f10b /src/lib
parent0f7523ad977ea5230591ebbc5548afc8c9db9d90 (diff)
downloadbcfg2-ce20cdef23e5d2dfae99a3352bff4aa1bf39919a.tar.gz
bcfg2-ce20cdef23e5d2dfae99a3352bff4aa1bf39919a.tar.bz2
bcfg2-ce20cdef23e5d2dfae99a3352bff4aa1bf39919a.zip
Child proc fix
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3576 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Component.py8
1 files changed, 6 insertions, 2 deletions
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: