Commit 31906b4
authored
bpo-30225: Fix is_valid_fd() on macOS Tiger (python#1443) (python#1449)
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 1c4670e)1 parent 1bebd8a commit 31906b4
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1047 | 1055 | | |
1048 | 1056 | | |
1049 | 1057 | | |
| |||
1056 | 1064 | | |
1057 | 1065 | | |
1058 | 1066 | | |
| 1067 | + | |
1059 | 1068 | | |
1060 | 1069 | | |
1061 | 1070 | | |
| |||
0 commit comments