Author krsna
Recipients krsna, martin.panter
Date 2020-04-16.17:57:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1828690721.1681327.1587059847031@mail.yahoo.com>
In-reply-to <1587032020.19.0.854740932248.issue40299@roundup.psfhosted.org>
Content
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 <report@bugs.python.org> wrote: 

Martin Panter <vadmium+py@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 <report@bugs.python.org>
<https://bugs.python.org/issue40299>
_______________________________________
History
Date User Action Args
2020-04-16 17:57:34krsnasetrecipients: + krsna, martin.panter
2020-04-16 17:57:34krsnalinkissue40299 messages
2020-04-16 17:57:34krsnacreate