]> granicus.if.org Git - python/commit
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 3 May 2017 22:45:56 +0000 (00:45 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 22:45:56 +0000 (00:45 +0200)
commit1c4670ea0cc3d208121af11b9b973e6bb268e570
tree350e988ac5ac455bf51d1e775b8a1b430eab5760
parent5f161fd86dd5bb936a1a2a13391b13b7e59ec201
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443)

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.
Python/pylifecycle.c