[Python-checkins] cpython: Issue #14300: Under Windows, sockets created using socket.dup() now allow

antoine.pitrou python-checkins at python.org
Sun Apr 1 01:25:21 CEST 2012


http://hg.python.org/cpython/rev/5be4d8fc9c44
changeset:   76035:5be4d8fc9c44
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Apr 01 01:14:39 2012 +0200
summary:
  Issue #14300: Under Windows, sockets created using socket.dup() now allow overlapped I/O.
Patch by sbt.

files:
  Misc/NEWS              |  3 +++
  Modules/socketmodule.c |  2 +-
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@
 Library
 -------
 
+- Issue #14300: Under Windows, sockets created using socket.dup() now allow
+  overlapped I/O.  Patch by sbt.
+
 - Issue #13872: socket.detach() now marks the socket closed (as mirrored
   in the socket repr()).  Patch by Matt Joiner.
 
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -381,7 +381,7 @@
         return INVALID_SOCKET;
 
     return WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
-                     FROM_PROTOCOL_INFO, &info, 0, 0);
+                     FROM_PROTOCOL_INFO, &info, 0, WSA_FLAG_OVERLAPPED);
 }
 #define SOCKETCLOSE closesocket
 #else

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list