]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852) (GH-12863)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 17 Apr 2019 16:30:27 +0000 (09:30 -0700)
committerVictor Stinner <vstinner@redhat.com>
Wed, 17 Apr 2019 16:30:27 +0000 (18:30 +0200)
commitb87a8073db73f9ffa96104e00c624052e34b11c7
tree36f8de65ce331fb156f8df04fc837dcae5e91feb
parenta6fce19968cd39dfbc2684f97ca3184d9996f61e
bpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852) (GH-12863)

Fix Python Initialization code on FreeBSD to detect properly when
stdin file descriptor (fd 0) is invalid.

On FreeBSD, fstat() must be used to check if stdin (fd 0) is valid.
dup(0) doesn't fail if stdin is invalid in some cases.
(cherry picked from commit 3092d6b2630e4d2bd200fbc3231c27a7cba4d6b2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Misc/NEWS.d/next/Core and Builtins/2019-04-16-11-56-12.bpo-32849.aeSg-D.rst [new file with mode: 0644]
Python/pylifecycle.c