I just thought up of a possible suggestion that could solve the current problem
with $r->child_terminate().
In short, we want a way to cleanly kill off a children, most likely because we
want to reclaim the memory it has been using. Add a threaded mpm on top of that,
and it's pretty hard, without an ap_* API for it.
I just realized there is kindof an API for this, sending SIGTERM to the child
in question. For the prefork MPM, this will make the child act just like if the
parent is getting ready to gracefully terminate, and will complete the current
request and terminate itself. For the worker MPM, the same thing will happen,
except that the child process will wait for all threads to finish doing what
they were doing.
To me, this seems like a sensible solution. Calling $r->child_terminate() might
not immediately kill off a child, but would guarantee that it would stop processing
requests and self-terminate as soon as it's safe for it to do so.
The keyword is the "not immediately" -- that solution will make Apache::SizeLimit and its clones unreliable. Since you will never be able to bracket the memory usage again. Ofcourse the apache 1.3 api was calling child_terminate at the end of the request, so it wasn't immediate either, but it was guaranteed to be called asap. I believe with signals it's totally unreliable.
And I can't see how this is going to work in the case of threaded mpm. The process will stop serving all requests and wait for a single thread to finish a long response not responding to any other incoming requests if you have only one process?
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]