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 bukzor
Recipients bukzor
Date 2014-10-24.18:25:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414175114.21.0.89253014317.issue22722@psf.upfronthosting.co.za>
In-reply-to
Content
In order to make an inheritable pipe, the code is quite a bit different between posixes that implement pipe2 and those that don't (osx, mainly). I believe the officially-supported path is to call os.pipe() then os.setinheritable(). This seems objectionable since set_inheritable() code is invoked twice, where I'd prefer to invoke it zero times (or at most once).

Would it be acceptable to implement a pipe2 shim for those platforms?
If so, I'll (attempt to) provide a patch.

Alternatively, can we change the signature of os.pipe() to os.pipe(flags=O_CLOEXEC) ?  In my opinion, such a function could be implemented via pipe2 on those platforms that provide it, obviating any need for an os.pipe2.

Please tell me which patch to provide, if any.
History
Date User Action Args
2014-10-24 18:25:14bukzorsetrecipients: + bukzor
2014-10-24 18:25:14bukzorsetmessageid: <1414175114.21.0.89253014317.issue22722@psf.upfronthosting.co.za>
2014-10-24 18:25:14bukzorlinkissue22722 messages
2014-10-24 18:25:13bukzorcreate