[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-08 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: OK, the issue identified by Hirokazu Yamamoto in msg113106 only actually affects the 2.x series, because of the awkwardly multiple-level interaction between file handles. The io rewrite in 3.x seems not to suffer the same way. Nonetheless,

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-08 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Committed in r83815, r83816, r83817 -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-06 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Committed in r83759 r83760 r83761 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210 ___

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Sorry for posting to closed entry, but I think handle should be closed in Lib/subprocess.py not in PC/_subprocess.c. I noticed following code showed strange error. import subprocess for _ in xrange(2): stdout =

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-06 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Blast. Thanks; I'll have to rework those patches then. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210 ___

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Patch attached with code test which fixes this within _subprocess.c at least for Windows -- assignee: - tim.golden Added file: http://bugs.python.org/file18398/3210.r83741.patch ___ Python tracker

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Patch added for 31 branch -- Added file: http://bugs.python.org/file18399/3210.release31-maint.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Patch added for 27 branch -- Added file: http://bugs.python.org/file18400/3210.release27-maint.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Tim, I updated your test to use some of the newer and preferred unittest features and made a change to do the common stuff in loops. The _subprocess.c changes look fine to me. See attached issue3210_py3k.diff. -- nosy: +brian.curtin Added

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- stage: unit test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210 ___ ___

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Brian, I'm not sure that the test as rewritten will exercise the error. The key is that the traceback object will prevent the handles from being finalised until it is itself finalised. After your change I expect the handles to release anyway

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-05 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Ah ok. I got hooked onto new unittest stuff and overdid it. Whoops. In that case, I guess just the last lines converting your assert_ to assertFalse would be my only suggestion. -- ___ Python tracker

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Same problem in 3.1.2 -- nosy: +tjreedy stage: - unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: No, this is not duplicate of issue5179. That issue described handle was leaked when exception occurred. But this issue is not *leak*. See following code. import subprocess, os, sys file = open(filename, w) try: proc =

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Probably we can fix this issue by calling Close() of sp_handle_type somewhere in Lib/subprocess.py, but I have no patch now. -- ___ Python tracker rep...@bugs.python.org

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-08-26 Thread Todd Whiteman
Todd Whiteman twhit...@yahoo.com.au added the comment: Is this a duplicate of this already fixed issue: issue5179 ? -- nosy: +twhitema ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210 ___

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-12-08 Thread Mark Mentovai
Mark Mentovai [EMAIL PROTECTED] added the comment: This is not limited to Windows. I experience this bug on Mac OS X and Linux as well. http://mail.python.org/pipermail/python-list/2008-August/505753.html Attachment 3210.py is a reduced testcase. It attempts to execute nocmd, which should

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-08-07 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto [EMAIL PROTECTED]: -- nosy: +ocean-city ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3210 ___ ___ Python-bugs-list

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-08-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: Hello. I had lecture about exception frames on issue3515. When Lib/subprocess.py (814)'s CreateProcess() raises exception, p2cread will be freed by refcount GC, but it never happen before os.remove() because sys.exc_traceback holds

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-08-07 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto [EMAIL PROTECTED]: ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3210 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-08-03 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: I tried closing -all- of the handles listed here (the std ones used as input to _get_handles and the pipe read/write ones returned) on an OSError during CreateProcess but the problem still occurs for me using the test code in msg68787.

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-07-06 Thread Gregory P. Smith
Changes by Gregory P. Smith [EMAIL PROTECTED]: -- assignee: - gregory.p.smith components: +Library (Lib) -Extension Modules nosy: +gregory.p.smith priority: - normal versions: +Python 2.6 ___ Python tracker [EMAIL PROTECTED]

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-06-27 Thread Geoffrey Bache
Geoffrey Bache [EMAIL PROTECTED] added the comment: A note on workarounds, the garbage collector seems to release the handles when the function exits, so removing the file in a caller works for me. However Tim's proposed fix with os.close didn't do so. ___

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-06-26 Thread Geoffrey Bache
New submission from Geoffrey Bache [EMAIL PROTECTED]: Run the following code on Windows: import subprocess, os file = open(filename, w) try: proc = subprocess.Popen(nosuchprogram, stdout=file) except OSError: file.close() os.remove(filename) This produces the following exception: