]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Calling _cleanup() does not guarantee that all processes have
authorGuido van Rossum <guido@python.org>
Tue, 20 Apr 1999 12:27:31 +0000 (12:27 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 20 Apr 1999 12:27:31 +0000 (12:27 +0000)
terminated; this makes the final assert in the self-test code fail if
the parent runs faster than the children.  Fix this by calling wait()
on the remaining children instead.

Lib/popen2.py

index 4c429589133886f182feec01a5678f7824f63d29..d4b5d266cb068e72e7f0e6d0c31a1edee02ddcbf 100644 (file)
@@ -91,7 +91,8 @@ def _test():
     w.close()
     assert r.read() == teststr
     assert e.read() == ""
-    _cleanup()
+    for inst in _active[:]:
+        inst.wait()
     assert not _active
     print "All OK"