Message179027
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). |
|
Date |
User |
Action |
Args |
2013-01-04 14:30:26 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc, pitrou, christian.heimes, neologix, rosslagerwall, sbt, alexey-smirnov |
2013-01-04 14:30:25 | vstinner | set | messageid: <1357309825.96.0.866627782609.issue16850@psf.upfronthosting.co.za> |
2013-01-04 14:30:25 | vstinner | link | issue16850 messages |
2013-01-04 14:30:25 | vstinner | create | |
|