New submission from Buck Golemon:

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.

----------
messages: 229947
nosy: bukzor
priority: normal
severity: normal
status: open
title: inheritable pipes are unwieldy without os.pipe2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22722>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to