]> granicus.if.org Git - python/commit
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1450)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 4 May 2017 11:21:16 +0000 (13:21 +0200)
committerGitHub <noreply@github.com>
Thu, 4 May 2017 11:21:16 +0000 (13:21 +0200)
commit8a1c71053139f20348ea487c0c464694ed3c88c5
tree7bccb5f42ce5ce45a0c4ee0654beff9eaee2a500
parent943861f09ab6bffcd1d97efcd0dd6c87c7f26800
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1450)

is_valid_fd() now uses fstat() instead of dup() on macOS to return 0
on a pipe when the other side of the pipe is closed. fstat() fails
with EBADF in that case, whereas dup() succeed.
(cherry picked from commit 1c4670ea0cc3d208121af11b9b973e6bb268e570)
Python/pylifecycle.c