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 socketpair
Recipients alexey-smirnov, amaury.forgeotdarc, georg.brandl, neologix, petri.lehtinen, pitrou, python-dev, socketpair, vstinner
Date 2011-09-06.08:42:54
SpamBayes Score 0.00010310047
Marked as misclassified No
Message-id <1315298575.04.0.332689439856.issue12105@psf.upfronthosting.co.za>
In-reply-to
Content
O_CLOEXEC is not linux-only. Windows has the same flag. In file-opening functions there is lpSecurityAttributes argument. And there is bInheritHandle member of corresponding structure.

http://msdn.microsoft.com/en-us/library/aa379560(v=VS.85).aspx :
bInheritHandle
A Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle.

So, why not to implement 'e' letter in open()? it is true crossplatform. On platforms where inheritance does not work, flag should be ignored.

P.S. Moreover, I think that all file-descriptor-crete functions (open, socket, pipe, dup, ...) should set CLOEXEC atomically
History
Date User Action Args
2011-09-06 08:42:55socketpairsetrecipients: + socketpair, georg.brandl, amaury.forgeotdarc, pitrou, vstinner, neologix, python-dev, petri.lehtinen, alexey-smirnov
2011-09-06 08:42:55socketpairsetmessageid: <1315298575.04.0.332689439856.issue12105@psf.upfronthosting.co.za>
2011-09-06 08:42:54socketpairlinkissue12105 messages
2011-09-06 08:42:54socketpaircreate