Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 789e7ad

Browse files
committed
Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
as "The pipe is being closed") is now mapped to POSIX errno EPIPE (previously EINVAL).
2 parents 14c0f03 + 586bfe4 commit 789e7ad

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ What's New in Python 3.3 Alpha 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
14+
as "The pipe is being closed") is now mapped to POSIX errno EPIPE
15+
(previously EINVAL).
16+
1317
- Issue #12911: Fix memory consumption when calculating the repr() of huge
1418
tuples or lists.
1519

PC/errmap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ int winerror_to_errno(int winerror)
7272
case 202: return 8;
7373
case 206: return 2;
7474
case 215: return 11;
75+
case 232: return 32;
7576
case 267: return 20;
7677
case 1816: return 12;
7778
default: return EINVAL;

PC/generrmap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ int main()
1919
/* Issue #12802 */
2020
if (i == ERROR_DIRECTORY)
2121
errno = ENOTDIR;
22+
/* Issue #13063 */
23+
else if (i == ERROR_NO_DATA)
24+
errno = EPIPE;
2225
else
2326
continue;
2427
}

0 commit comments

Comments
 (0)