From 586bfe4500465442acff5043f7b589e4a8b97b6a Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 7 Oct 2011 16:16:31 +0200 Subject: [PATCH] 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). --- Misc/NEWS | 4 ++++ PC/errmap.h | 1 + PC/generrmap.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 44435fef36d..e9555b39caa 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,10 @@ What's New in Python 3.2.3? Core and Builtins ----------------- +- 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). + - Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or lists. diff --git a/PC/errmap.h b/PC/errmap.h index 8dde31c81c3..985f673a464 100644 --- a/PC/errmap.h +++ b/PC/errmap.h @@ -72,6 +72,7 @@ int winerror_to_errno(int winerror) case 202: return 8; case 206: return 2; case 215: return 11; + case 232: return 32; case 267: return 20; case 1816: return 12; default: return EINVAL; diff --git a/PC/generrmap.c b/PC/generrmap.c index 0323cd4a08d..953344c0d79 100644 --- a/PC/generrmap.c +++ b/PC/generrmap.c @@ -19,6 +19,9 @@ int main() /* Issue #12802 */ if (i == ERROR_DIRECTORY) errno = ENOTDIR; + /* Issue #13063 */ + else if (i == ERROR_NO_DATA) + errno = EPIPE; else continue; }