[Python-Dev] Fork on Win32 - was (test_fork1 failing...)

M.-A. Lemburg mal@lemburg.com
Fri, 28 Jul 2000 16:39:21 +0200

Guido van Rossum wrote:
> > > IIRC ActiveState contributed to Perl a version of fork that works
> > > on Win32. Has anyone looked at this? Could it be grabbed for
> > > Python? This would help heal one of the more difficult platform
> > > rifts. Emulating fork for Win32 looks quite difficult to me but if
> > > its already done...
> > This would indeed be a *very* useful addition and help porting
> > os.fork() applications to Win32. (Ok, in the long run they would
> > have to be converted to multi-threaded apps due to the process
> > creation overhead on Win32, but for short term porting to Win32
> > this would be a Cool Thing, IMHO.)
> I have only one word: yuck!
> Portable Python code should not rely on fork.

I wasn't talking about "portable" code, but about "porting"
code to Win32. I happen to use an application which manages
a few processes and spawns these using .fork(). It would
nice to have a .fork() like API on Win32 to experiment with.

Anyway, I would already be happy if I could just look at the
code from ActiveState... if it's Perl all the way I probably
don't want to look any further into this ;-)

BTW, I'm not too familiar with IPC on Win32. What would be
the best strategy to this on the Windows platforms ? I
remember that Skip once posted a comparison of Unix
Domain sockets and TCP Sockets on Unix which showed that UD sockets
are much faster than TCP sockets. On Win32 these don't exist
and I suppose that TCP sockets are too slow for my server.

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/