Author vstinner
Recipients alexey-smirnov, amaury.forgeotdarc, christian.heimes, neologix, pitrou, rosslagerwall, sbt, vstinner
Date 2013-01-04.14:30:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357309825.96.0.866627782609.issue16850@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a work-in-progress patch to test my idea: add "e" flag to open().

Limitations/TODO:

 * The unit test doesn't work on Windows (it requires fcntl)
 * "e" mode and the opener argument are exclusive: if O_CLOEXEC and O_NOINHERINT are missing, I don't see how the opener can be aware of the "e" flag. Or should we call fcntl(F_SETFD, flags|FD_CLOEXEC) after the opener? It would be strange: the opener is supposed to be the only one to decide how the file is opened, isn't it?
 * NotImplementedError is raised if O_CLOEXEC, O_NOINHERIT and fcntl() are missing

I only tested my patch on Linux (3.6).
History
Date User Action Args
2013-01-04 14:30:26vstinnersetrecipients: + vstinner, amaury.forgeotdarc, pitrou, christian.heimes, neologix, rosslagerwall, sbt, alexey-smirnov
2013-01-04 14:30:25vstinnersetmessageid: <1357309825.96.0.866627782609.issue16850@psf.upfronthosting.co.za>
2013-01-04 14:30:25vstinnerlinkissue16850 messages
2013-01-04 14:30:25vstinnercreate