[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2
Richard Oudkerk
report at bugs.python.org
Fri Jul 20 20:09:46 CEST 2012
Richard Oudkerk <shibturn at gmail.com> added the comment:
Actually, if you replace
print(os.popen("uname").read())
with
f = os.popen("uname")
print(f.read())
f.close()
or
with os.popen("uname") as f:
print(f.read())
then things should work. This is because f.close() waits for the pid.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15408>
_______________________________________
More information about the Python-bugs-list
mailing list