Somehow I feel that this problem exists in other (it not all) mpms
besides worker. Havent tested it though. Anybody know
of an mpm where the forked child wont close the connection ?

-Roshan



-----Original Message-----
From: Jeff Trawick [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 08, 2004 8:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Bug: Apache hangs if script invokes fork/waitpid

On Thu, 07 Oct 2004 12:53:47 -0700, Paul Querna <[EMAIL PROTECTED]>
wrote:
> Jeff Trawick wrote:
> > I think there needs to be a mod_fork which provides a more general 
> > purpose daemon than that used by mod_cgid, and some Apache API will 
> > know whether or not to send a request over there.  This preserves 
> > the goal of having fork() called only by single-threaded processes 
> > so that all manner of pain is avoided.
> 
> Big +1 from me in concept.
> 
> I am not sure how to do the implementation best.  mod_cgid doesn't 
> really 'fork' in the sense most programs do, its mostly just starting 
> up a cgi process -- from an executable on the file system.
> 
> This seems drastically different from the requirements of a generic
fork().
> 
> Any thoughts on how you would want to implement this in a generic 
> manner for any call from anywhere for any module?

it has to be extremely restricted; the obvious capability is to allow
apr_proc_create() to be called, with pipes set up properly back to code
running in the Apache thread; another possible service is to allow a new
child to be created and then in that process call some specified
function which was copied into the mod_fork daemon process at apache
startup; maybe that code happens to be some part of mod_perl which can
implement suitable services on behalf of a perl script

I suspect that whatever restrictions on applications are necessary to
implement such a service are the same restrictions which must be
respected anyway in order to have an application which works
reliably+portably in a threaded MPM.

Reply via email to