[issue21332] subprocess bufsize=1 docs are misleading

Martin Panter report at bugs.python.org
Fri May 2 08:14:11 CEST 2014


Martin Panter added the comment:

On second thoughts maybe the idea of closing the input is not such a good idea in practice. Once you call os.close() on the file descriptor, that descriptor becomes unallocated, and I can’t see any way to prevent p.stdin.close(), Popen() context, destructors, etc from trying to close the file descriptor again. If the Python test suite is ever multithreaded (I’m not really familiar with it), that would be a real problem. In any case closing an unallocated file descriptor is a bad idea. Maybe the deadlocking version is more appropriate after all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21332>
_______________________________________


More information about the Python-bugs-list mailing list