[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

Kristján Valur Jónsson report at bugs.python.org
Sun Apr 8 19:06:03 CEST 2012


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

multiprocessing.reduction still appears to use DuplicateHandle to copy sockets.
I propose adding a pair of custom functions to _multiprocessing, that "pickles" and "unpickles" handles.  It can detect socket handles as being different from e.g. pipe handles by using WSADuplicateSocket and return a bytes object, similar to what is already done in socketmodule (see issue 14310)
On non-windows, this would be a no-op.
_multiprocessing already linkes with winsock, whereas the subprocess is part of python core which doesn't.

----------
nosy: +kristjan.jonsson
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14522>
_______________________________________


More information about the Python-bugs-list mailing list