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 vstinner
Recipients loewis, neologix, s7v7nislands, vstinner
Date 2011-03-02.13:22:41
SpamBayes Score 0.0287534
Marked as misclassified No
Message-id <>
As written by Charles-Francois Natali (msg129890), we can use closefrom(). Pseudo-code: find the biggest fd than that be kept open, call closefrom(highest+1), and then use close() (os.closerange) for fd in 0..highest that have to be closed.

closefrom() is available on OpenBSD, Solaris and NetBSD. I don't know for FreeBSD:

On Linux, we can use os.listdir("/proc/self/fd") to get the list of open files.
Date User Action Args
2011-03-02 13:22:44vstinnersetrecipients: + vstinner, loewis, s7v7nislands, neologix
2011-03-02 13:22:43vstinnersetmessageid: <>
2011-03-02 13:22:41vstinnerlinkissue11284 messages
2011-03-02 13:22:41vstinnercreate