[Python-checkins] cpython: Issue #23618: Fix EINTR handling on Windows
victor.stinner
python-checkins at python.org
Wed Apr 1 11:10:37 CEST 2015
https://hg.python.org/cpython/rev/8ec4acfdb851
changeset: 95339:8ec4acfdb851
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Apr 01 11:09:43 2015 +0200
summary:
Issue #23618: Fix EINTR handling on Windows
Windows uses WSAEINTR error code, not EINTR, for socket functions.
files:
Modules/socketmodule.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -2476,7 +2476,7 @@
}
err = GET_ERROR;
- if (err == EINTR && PyErr_CheckSignals())
+ if (CHECK_ERRNO(EINTR) && PyErr_CheckSignals())
return -1;
wait_connect = (s->sock_timeout > 0 && err == IN_PROGRESS_ERR
@@ -2488,7 +2488,7 @@
if (timeout == -1) {
/* select() failed */
err = GET_ERROR;
- if (err == EINTR && PyErr_CheckSignals())
+ if (CHECK_ERRNO(EINTR) && PyErr_CheckSignals())
return -1;
return err;
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list