Hey Carl,
The only place where forking is useful is where you want something to
continue processing after sending the response back to the client.
You can achieve the same effective result by calling
$r->child_terminate()
(assuming your using pre-fork). The currently running child exits at
the end
of the request freeing any memory it's allocated, and the main apache
server
process will fork a new child to replace it if needed.
This revelation of how Perl does not free up memory it allocates is
worrying, especially as I do process large documents regularly.
If I read you right, you are saying that $r->child_terminate will force
the current thread to terminate, causing Apache to create a new thread.
Is that right? I use 'threads' in place of 'processes' as I refer to the
Windows implementation of Apache.
Thanks.