(original) (raw)

Great.  I was about to write unittests for my patch, when I found out that I wanted to use multiprocessing to run them.

So, I decided that the tests rather belonged in there rather than test\_socket.py.  This is where I stumbled upon code that multiprocessing uses to transfer sockets for unix.  I need to read that code and understand it and see if it can be persuaded to magically work on windows too.

 

K

 

From: Glyph Lefkowitz \[mailto:glyph@twistedmatrix.com\]
Sent: 14\. mars 2012 17:22
To: Kristj�n Valur J�nsson
Cc: Python-Dev (python-dev@python.org)
Subject: Re: \[Python-Dev\] sharing sockets among processes on windows

 

 

On Mar 13, 2012, at 5:27 PM, Kristj�n Valur J�nsson wrote:



Hi,

I�m interested in contributing a patch to duplicate sockets between processes on windows.

Tha api to do this is WSADuplicateSocket/WSASocket(), as already used by dup() in the \_socketmodule.c

Here�s what I have:

 

Just in case anyone is interested, we also have a ticket for this in Twisted: <http://twistedmatrix.com/trac/ticket/4389>. It would be great to share code as much as possible.

 

-glyph