On Wed, 6 Oct 2004 11:01:23 -0700, Naik, Roshan <[EMAIL PROTECTED]> wrote: > The Problem: > --------------- > I notice Apache 2(worker mpm) is not able to correctly handle > a fork/waitpid invoked by a script used with mod_perl.
>From Ulrich Drepper: "No threaded programs must use anything but _exit or exec after fork." Perhaps a tiny bit harsh? What if you fork a copy of a mutex used by some third-party Apache module? That module would need to be using pthread_atfork() to make sure ownership is preserved properly. Apache/APR certainly doesn't do it with its mutexes. 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.
