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 javabrett
Recipients Geass-LL, JelleZijlstra, eryksun, javabrett, shihai1991, sxt1001
Date 2022-01-25.10:56:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643108167.96.0.895652685081.issue46454@roundup.psfhosted.org>
In-reply-to
Content
docker run -i --rm python:3.9 <<-EOF

import os

print(os.get_inheritable(0))

fd_null_before_close = os.open("/dev/null", os.O_RDWR)
os.close(0)
fd_null = os.open("/dev/null", os.O_RDWR)

print(fd_null_before_close)
print(fd_null)

os.dup2(fd_null, 0)
print(os.get_inheritable(0))

os.dup2(fd_null_before_close, 0)
print(os.get_inheritable(0))

EOF
True
3
0
False
True
History
Date User Action Args
2022-01-25 10:56:07javabrettsetrecipients: + javabrett, eryksun, JelleZijlstra, shihai1991, sxt1001, Geass-LL
2022-01-25 10:56:07javabrettsetmessageid: <1643108167.96.0.895652685081.issue46454@roundup.psfhosted.org>
2022-01-25 10:56:07javabrettlinkissue46454 messages
2022-01-25 10:56:07javabrettcreate