[New-bugs-announce] [issue5312] errno not being set
Benjamin Peterson
report at bugs.python.org
Thu Feb 19 05:16:24 CET 2009
New submission from Benjamin Peterson <benjamin at python.org>:
def test_leaking_fds_on_error(self):
# see bug #5179: Popen leaks file descriptors to PIPEs if
# the child fails to execute; this will eventually exhaust
# the maximum number of open fds. 1024 seems a very common
# value for that limit, but Windows has 2048, so we loop
# 1024 times (each call leaked two fds).
for i in range(1024):
try:
subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
# Windows raises IOError
except (IOError, OSError) as err:
self.assertEqual(err.errno, 2)
This test is failing in py3k because errno is not being set on the
exception and is None. I don't have time to investigate more at the moment.
----------
messages: 82456
nosy: benjamin.peterson, georg.brandl
priority: high
severity: normal
status: open
title: errno not being set
versions: Python 3.0, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5312>
_______________________________________
More information about the New-bugs-announce
mailing list