[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close
Richard Oudkerk
report at bugs.python.org
Thu Nov 14 19:20:05 CET 2013
Richard Oudkerk added the comment:
Note that on Windows if you redirect the standard streams then *all* inheritable handles are inherited by the child process.
Presumably the handle for f_w file object (and/or a duplicate of it) created in one thread is accidentally "leaked" to the other child process. This means that shutil.rmtree() cannot succeed until *both* child processes have exited.
PEP 446 might fix this, although there will still be a race condition.
----------
nosy: +sbt
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19575>
_______________________________________
More information about the Python-bugs-list
mailing list