Message136333
> Using spawn_python() to check that os.O_CLOEXEC flag is correctly set seems
> overkill. Why not just testing fcntl.fcntl(f.fileno(), fcntl.F_GETFL) &
> FD_CLOEXEC)?
Because I couldn't find a place where the CLOEXEC flag was fully
tested (I mean, checking in the child process that the FD was
correctly closed), so I took the opportunity to test it thoroughly
here.
But you're right it's maybe a little bit overkill, so here's a patch
using just F_GETFL. Pick up whichever you like.
>> Note that I'm not sure that adding this flag to built-in open()
>> is necessarily a good idea
>
> I agree.
>
OK.
> open() documentation may explain the os.fdopen(os.open()) "trick" to use
> low-level options like O_SYNC or O_CLOEXEC.
>
Why not, but I leave it to someone more comfortable with documentation
than me :-) |
|
Date |
User |
Action |
Args |
2011-05-19 20:34:20 | neologix | set | recipients:
+ neologix, amaury.forgeotdarc, vstinner, socketpair, alexey-smirnov |
2011-05-19 20:34:19 | neologix | link | issue12105 messages |
2011-05-19 20:34:19 | neologix | create | |
|