Naik, Roshan wrote:
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



[..cut..]

I think we have some kind of "works as designed" problem here. As far as
I understand some of the main gains (among many others) of using mod_perl compared
to running a perl script as cgi are:

1. The perl script runs within the Apache process / thread, so no costly fork is 
required.
2. The perl code does not need to be compiled each time it is used.

I think 1. is the "problem" in our case. If you do a fork in your perl script
you simply create another Apache process where your forked perl script is running
inside. After the forked part of the script has finished its job mod_perl will be left
and the Apache process will continue doing its normal "designed" work: Waiting for the 
next request.
This behaviour should be totally independent from the MPM you use.
So I think mod_perl needs to provide some kind of wrapper for the fork command
that does the needed cleanups just before the real fork is done (as other modules in
Apache do that fork processes) and that will terminate the process as soon as the user
provided perl code of this forked process is left. So the behaviour will differ from
the normal mod_perl behaviour (giving control back to the Apache process / thread).


Regards

RÃdiger



Reply via email to