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.
Thoughts ?
-- -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature