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 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.
History
Date User Action Args
2011-05-19 19:15:32vstinnersetrecipients: + vstinner, amaury.forgeotdarc, neologix, socketpair, alexey-smirnov
2011-05-19 19:15:32vstinnersetmessageid: <1305832532.67.0.252255366596.issue12105@psf.upfronthosting.co.za>
2011-05-19 19:15:32vstinnerlinkissue12105 messages
2011-05-19 19:15:32vstinnercreate