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 gregory.p.smith, loewis, neologix, pitrou, s7v7nislands, vstinner
Date 2011-03-02.19:54:51
SpamBayes Score 1.21747e-06
Marked as misclassified No
Message-id <>
> Your posix_closefrom() implementation as written today is not safe to call between fork() and exec() due to the opendir/readdir implementation.  It can and will hang processes at unexpected times.

Yeah, I remove the patch when I realized that.

> According to closefrom() is not async-signal-safe. :(

Strange. I was sure closefrom was implemented with fcntl.

> I still want to find a way to do this nicely on Linux (even if it means me going and implementing a closefrom syscall to be added to 2.6.39).

Well, arguably, CLOEXEC is designed to cope with this kind of situation.
closefrom is more like a hack (and mostly useless if it's really not async-safe).
Date User Action Args
2011-03-02 19:54:52neologixsetrecipients: + neologix, loewis, gregory.p.smith, pitrou, vstinner, s7v7nislands
2011-03-02 19:54:52neologixsetmessageid: <>
2011-03-02 19:54:51neologixlinkissue11284 messages
2011-03-02 19:54:51neologixcreate