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 neologix
Recipients Aaron.Sherman, giampaolo.rodola, gregory.p.smith, neologix, pitrou, vstinner
Date 2011-03-02.13:13:38
SpamBayes Score 1.73438e-06
Marked as misclassified No
Message-id <>
> So, even though implemented in C, the file descriptor closing logic is still quite costly!

Yes, see this recent issue:

In the reporter's case, it's much worse, because FreeBSD (at least the version he's using) has a SC_OPEN_MAX of 655000, so that passing close_fds=True bumps the Popen runtime to 3 seconds!
Some Unix offer a closefrom() or similar function to close all open file descriptors (and only open ones), which should be much faster.
I'm not aware of anything equivalent under Linux, but it might be worth looking into.
Date User Action Args
2011-03-02 13:13:39neologixsetrecipients: + neologix, gregory.p.smith, pitrou, vstinner, giampaolo.rodola, Aaron.Sherman
2011-03-02 13:13:39neologixsetmessageid: <>
2011-03-02 13:13:38neologixlinkissue11314 messages
2011-03-02 13:13:38neologixcreate