krsna <bhr...@yahoo.com> added the comment:

I should read the updated documentation changes to modules more often. Adding 
the inheritable works and yes I tested with `os.dup2` which seemed consistent 
with C's dups2. I still think it is quite odd that the low level `dup` function 
has a different behavior than one would expect.

Thank you for you helpful and quick reply Martin.

This may be closed as it is a documented, imo, misbehavior.

On Thursday, April 16, 2020, 12:13:58 AM HST, Martin Panter 
<rep...@bugs.python.org> wrote: 

Martin Panter <vadmium...@gmail.com> added the comment:

The file descriptor created by "os.dup" is not inherited by child processes by 
default since Python 3.4.
https://docs.python.org/3/library/os.html#os.dup

Does it work if you use "os.set_inheritable" or "os.dup2" (which apparently 
sets it inhertiable by default)?

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40299>
_______________________________________

----------

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

Reply via email to