passing a socket to a subprocess in windows

Gabriel Genellina gagsl-py2 at
Tue Mar 16 23:39:04 CET 2010

En Tue, 16 Mar 2010 14:10:16 -0300, Daniel Platz  
< at> escribió:

> I have a problem with passing a socket to a subprocess in windows. It
> works in Linux and for windows there is a workaround in the Python
> doc. However, this workaround does not work. It was already noted by
> other people and they Python issue tracker

Unfortunately I cannot test it at this moment, but around line 360 in  

#if defined(MS_WINDOWS) || defined(__BEOS__)
#define NO_DUP /* Actually it exists on NT 3.5, but what the heck... */

you could try removing that #define NO_DUP and recompiling. socket.fromfd  
should appear, and hopefully socket objects can now be sent thru the  
multiprocessing connection.

(I cannot see how the example could have actually worked on Windows, maybe  
I'm missing something. Perhaps broke  

Gabriel Genellina

More information about the Python-list mailing list