[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close
Bernt Røskar Brenna
report at bugs.python.org
Wed Nov 13 23:25:52 CET 2013
Bernt Røskar Brenna added the comment:
Here's an improved repro script.
I believe it demonstrates that it is the combination of subprocess.Popen and threading that causes the problem.
Here's the output from my Windows XP VM:
***
c:\...> c:\Python33\python.exe repro_improved.py
Windows-XP-5.1.2600-SP3
Concurrency: 2
Task kind: subprocess_redirfile
3 errors of 10
Concurrency: 1
Task kind: subprocess_redirfile
0 errors of 10
Concurrency: 2
Task kind: subprocess_devnull
5 errors of 10
Concurrency: 1
Task kind: subprocess_devnull
0 errors of 10
Concurrency: 2
Task kind: nosubprocess
0 errors of 10
Concurrency: 1
Task kind: nosubprocess
0 errors of 10
***
Note that:
- even when subprocess redirects to DEVNULL there are errors
- when no subprocess.Popen is executed, no errors occur (the file is created as normal, but is not used by subprocess.Popen)
----------
Added file: http://bugs.python.org/file32604/repro_improved.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19575>
_______________________________________
More information about the Python-bugs-list
mailing list