Message136328
| Author |
vstinner |
| Recipients |
alexey-smirnov, amaury.forgeotdarc, neologix, socketpair, vstinner |
| Date |
2011年05月19日.19:15:32 |
| SpamBayes Score |
0.00031280922 |
| Marked as misclassified |
No |
| Message-id |
<1305832532.67.0.252255366596.issue12105@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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)? I don't think that there are OSes with O_CLOEXEC but without fcntl(F_GETFL).
> Note that I'm not sure that adding this flag to built-in open()
> is necessarily a good idea
I agree.
open() documentation may explain the os.fdopen(os.open()) "trick" to use low-level options like O_SYNC or O_CLOEXEC. |
|