[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-patches
Subject:    [Patches] configure.in patch to use POSIX threads on Solaris
From:       guido () python ! org (Guido van Rossum)
Date:       2000-02-25 17:49:32
Message-ID: 200002251749.MAA19353 () eric ! cnri ! reston ! va ! us
[Download RAW message or body]

> On Fri, 25 Feb 2000, Pat Knight wrote:
> >...
> > Justification.
> > Use of POSIX threads on Solaris ensures that the fork() call only runs the 
> > thread that called fork() in the child. This is desirable to prevent (for 
> > example) parent server or database threads running in the child. Sun's 
> > -lthread library uses a traditional fork() which replicates all the 
> > parent's threads in the child. I find this undesirable.
> 
> +1
> 
> fyi: Apache ran into this same kind of issue (I think on AIX) for Apache
> 2.0 (which is threaded). The fork() used for running CGIs caused a huge
> overhead. As a result, Apache 2.0 actually has a "CGI daemon" process that
> the main server relies on to fork/exec CGI scripts. The daemon has no
> threads to duplicate at fork() time, so the fork-efficiency is much
> better.
> 
> My point is that the fork() behavior Pat mentions is quite bothersome; it
> would be nice for Python to avoid it.

Agreed.  We still can't promise this on all platforms (who will write
a test program in C to determine whether fork() behaves like fork1()?)
but where we can, we should promote fork==fork1.

--Guido van Rossum (home page: http://www.python.org/~guido/)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic