New submission from sbt <shibt...@gmail.com>: According to Microsoft's documentation sockets created using socket() have the overlapped attribute, but sockets created with WSASocket() do not unless you pass the WSA_FLAG_OVERLAPPED flag. The documentation for WSADuplicateSocket() says
If the source process uses the socket function to create the socket, the destination process must pass the WSA_FLAG_OVERLAPPED flag to its WSASocket function call. This means that dup_socket() in socketmodule.c should use return WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, &info, 0, WSA_FLAG_OVERLAPPED); instead of return WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, &info, 0, 0); (On Windows, the new multiprocessing.connection.wait() function depends on the overlapped attribute, although it is primarily intended for use with pipe connections not sockets.) Patch attached. ---------- files: socket_dup.patch keywords: patch messages: 155748 nosy: sbt priority: normal severity: normal status: open title: dup_socket() on Windows should use WSA_FLAG_OVERLAPPED versions: Python 3.3 Added file: http://bugs.python.org/file24841/socket_dup.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14300> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com