[issue22722] inheritable pipes are unwieldy without os.pipe2

STINNER Victor report at bugs.python.org
Mon Oct 27 15:48:18 CET 2014


STINNER Victor added the comment:

> Would it be acceptable to implement a pipe2 shim for those platforms?

If I understand correctly, you propose to add an option inheritable parameter to os.pipe():

def os.pipe(inheritable=False):
    ...

The PEP 446 was written to fix race conditions. os.pipe(inheritable=True) would create a race condition if another thread calls fork().

What is your use case? Please elaborate.

The subprocess module makes "pass_fds" file descriptors inheritables in a safe way.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22722>
_______________________________________


More information about the Python-bugs-list mailing list