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

Hirokazu Yamamoto report at bugs.python.org
Fri Aug 6 17:57:32 CEST 2010


Hirokazu Yamamoto <ocean-city at 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 = open("stdout.txt", "w")
    try:
        p = subprocess.Popen(["unknown"], stdout=stdout)
    except WindowsError:
        pass

// error

close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor

----------

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


More information about the Python-bugs-list mailing list