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

Trent Mick trentm@ActiveState.com
Fri, 28 Jul 2000 10:10:15 -0700

On Fri, Jul 28, 2000 at 12:21:08PM +0200, M . -A . Lemburg 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.)
> Can this code be grabbed from somewhere ?

It is all in ActivePerl. You can download the source code:


Besides, I would guess (and I *am* guessing, I don't know this) that the Perl
fork stuff is fairly closely tied to Perl, i.e. it may not be easy at all to
yank it out and plug it into Python.

However, I echo the Bill's and Guido's sentiments. Having a hacked 
emulation of fork encourages people to use it. Once someone has their
favorite UNIX app it running on Win32 with the fake-fork they will have
little incentive to port it properly using threads. There will then be calls
to improve to Win32 fork implementation... and that is the wrong support


Trent Mick