This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author benjamin.peterson
Recipients benjamin.peterson, georg.brandl
Date 2009-02-19.04:16:21
SpamBayes Score 2.7033042e-07
Marked as misclassified No
Message-id <1235016984.63.0.365921412426.issue5312@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-02-19 04:16:25benjamin.petersonsetrecipients: + benjamin.peterson, georg.brandl
2009-02-19 04:16:24benjamin.petersonsetmessageid: <1235016984.63.0.365921412426.issue5312@psf.upfronthosting.co.za>
2009-02-19 04:16:22benjamin.petersonlinkissue5312 messages
2009-02-19 04:16:22benjamin.petersoncreate