diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Component.py | 8 |
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: |