Message131510
Using WNOHANG means that still-running children won't get collected. This seems to defeat the point of reap_children(). This patch seems to work:
diff -r adbdb3e74461 Lib/test/support.py
--- a/Lib/test/support.py Sun Mar 20 17:36:26 2011 +0100
+++ b/Lib/test/support.py Sun Mar 20 17:45:35 2011 +0100
@@ -1294,10 +1294,9 @@ def reap_children():
while True:
try:
# This will raise an exception on Windows. That's ok.
- pid, status = os.waitpid(any_process, os.WNOHANG)
- if pid == 0:
- break
- except:
+ pid, status = os.waitpid(any_process, 0)
+ except OSError:
+ # Either we're on Windows, or no running child remains.
break
@contextlib.contextmanager |
|
Date |
User |
Action |
Args |
2011-03-20 16:48:01 | pitrou | set | recipients:
+ pitrou, nnorwitz, rosslagerwall |
2011-03-20 16:48:01 | pitrou | set | messageid: <1300639681.51.0.654119922856.issue11616@psf.upfronthosting.co.za> |
2011-03-20 16:47:58 | pitrou | link | issue11616 messages |
2011-03-20 16:47:58 | pitrou | create | |
|