Paul Moore <p.f.mo...@gmail.com> added the comment: This bug appears to be Unix-only. On Windows:
>>> from subprocess import * >>> p1 = Popen(['cat'], stdin=PIPE, stdout=PIPE) >>> p2 = Popen(['grep', 'a'], stdin=p1.stdout, stdout=PIPE) >>> p1.stdin.write("aaaaaaaaaaaaaaaa\n") >>> p1.stdin.close() >>> p2.stdout.read() 'aaaaaaaaaaaaaaaa\n' >>> So there's no clear reason why the default should change on Windows. (It's not possible to specify close_fds explicitly on Windows for this case: >>> p1 = Popen(['cat'], stdin=PIPE, stdout=PIPE, close_fds=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\Apps\Python27\lib\subprocess.py", line 630, in __init__ raise ValueError("close_fds is not supported on Windows " ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr which may imply that False is not only reasonable, but necessary on Windows. I haven't dug into this enough to know for sure if this is the case, though). ---------- nosy: +pmoore _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7213> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com