Gregory P. Smith added the comment:
To remove the double close fd-reuse-window race condition you describe in 3.2.3
and later I don't think you even need to add that code snippet. Just get rid
of the for loop calling os.close on those three fd's all together. self.stdin,
self.stdout and
Roundup Robot added the comment:
New changeset 6ebfdfe74c04 by Gregory P. Smith in branch '3.2':
Fixes issue #16140: The subprocess module no longer double closes its
http://hg.python.org/cpython/rev/6ebfdfe74c04
New changeset 9f8b0444c8a6 by Gregory P. Smith in branch '3.3':
Fixes issue
Roundup Robot added the comment:
New changeset 2bdd984a55ac by Gregory P. Smith in branch '2.7':
Fix issue #16140 bug that the fix to issue #16327 added - don't double
http://hg.python.org/cpython/rev/2bdd984a55ac
--
___
Python tracker
Changes by Gregory P. Smith g...@krypto.org:
--
resolution: - fixed
status: open - closed
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
Changes by Gregory P. Smith g...@krypto.org:
--
stage: test needed - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
Mark Dickinson added the comment:
test_gc and test_csv seem to be failing on some of the buildbots as a result of
these checkins. It looks as though the new test_subprocess test creates some
uncollectable garbage.
--
nosy: +mark.dickinson
___
Mark Dickinson added the comment:
Adding 'del p' at the end of the test method fixes this for me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
Gregory P. Smith added the comment:
That test is gross... it creates a nasty cycle of an instance back to itself
via a stubbed out nested function's enclosing scope.
I'm sanitizing it now to simplify the code and not have any cycles.
--
___
Python
New submission from Gregory P. Smith:
Ben Leslie writes this on python-dev:
Hi all,
I have a Python program where I have many threads each calling Popen, and I was
hitting some trouble.
I've been seeing this on 3.2.3, however I believe the same issue is still
potentially a problem on head.
Changes by Ross Lagerwall rosslagerw...@gmail.com:
--
nosy: +rosslagerwall
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
___
Gregory P. Smith added the comment:
What you've described makes sense.
The file descriptors are indeed conditionally wrapped in file objects using
io.open which could lead to a double close in the error case in a threaded
application. yuck.
1) The code needs to check if the fd was wrapped
Changes by Benno Leslie be...@benno.id.au:
--
nosy: +bennoleslie
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
___
Python-bugs-list
Benno Leslie added the comment:
Regarding #2 my understanding is that the FDs are already always wrapped.
E.g: at line
http://hg.python.org/cpython/file/b9ac3c44a4eb/Lib/subprocess.py#l798 it shows
these always being wrapped (assuming the file descriptor is not -1).
For my test case on
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
___
14 matches
Mail list logo