summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-04-20 12:27:31 (GMT)
committerGuido van Rossum <guido@python.org>1999-04-20 12:27:31 (GMT)
commit068d5724d82e065fc636814e332078edd7cb30fe (patch)
tree461419f0c3a9d42e699ed4be7dcf027d1d3da2ac
parent4ae52694c9f54338e3b3fc85fa1c52f3e59b7693 (diff)
downloadcpython-068d5724d82e065fc636814e332078edd7cb30fe.zip
cpython-068d5724d82e065fc636814e332078edd7cb30fe.tar.gz
cpython-068d5724d82e065fc636814e332078edd7cb30fe.tar.bz2
Calling _cleanup() does not guarantee that all processes have
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.
-rw-r--r--Lib/popen2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/popen2.py b/Lib/popen2.py
index 4c42958..d4b5d26 100644
--- a/Lib/popen2.py
+++ b/Lib/popen2.py
@@ -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"