diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-14 09:32:45 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-14 09:32:45 +0000 |
commit | 1b5632445be2dba6c66162749cc8bbf8dff887d1 (patch) | |
tree | 973695d5ebf9c80c6efd5706fc5a699ba681bf8b /Lib/SocketServer.py | |
parent | 339f5e3ffc4d1005020ffc2fc85fcc618c7461fa (diff) | |
download | cpython-git-1b5632445be2dba6c66162749cc8bbf8dff887d1.tar.gz |
Add diagnostic message to help figure-out why SocketServer tests occasionally crash
when trying to remove a pid that in not in the activechildren list.
Diffstat (limited to 'Lib/SocketServer.py')
-rw-r--r-- | Lib/SocketServer.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py index 2eed914492..1763c1d5e4 100644 --- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py @@ -452,7 +452,11 @@ class ForkingMixIn: except os.error: pid = None if not pid: break - self.active_children.remove(pid) + try: + self.active_children.remove(pid) + except ValueError, e: + raise ValueError('%s. x=%d and list=%r' % (e.message, pid, + self.active_children)) def handle_timeout(self): """Wait for zombies after self.timeout seconds of inactivity. |