I'm almost back on line as usual now.

I checked last week the code of the prefork and worker MPMs: it seems to me there is no API exposed to the module programming level meant to terminate a process.

The prefork and worker MPMs (I have little doubt it's the same for the event MPM) both have a clean_child_exit function declared as static, therefore private to the file's scope. These functions do some module specific tasks (usually calling other private functions) and then call exit().

The fact the MPMs do certain chores before calling exit implies it is not a good thing to call exit() ourselves, its equivalent to some fatal fault occurring to the child process from the web server point of view. It's something we can do but we should stress this point: it's not the right way and should be avoided

The problem becomes more severe with the worker MPM. Rivet's worker MPM bridge runs its own pool of threads each running at least one Tcl interpreter. This pool is controlled by a supervisor thread and it's easy to let our [exit] implementation notify each thread in the pool to orderly exit before the supervisor terminates the process by calling exit().

Nonetheless without a way to tell the child process to stop accepting connections we almost certainly are leaving some requests unprocessed unless we manage this 'shutting down' status and return 500 error codes for those requests.

 -- Massimo




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to