Bill Moseley wrote:
I'm running mod_perl/2.0.4 with a very large keep-alive set in my
httpd.conf.

Is there a way to detect when a graceful stop or restart has been requested
in the child apache processes?
I tried $SIG{USR1} and $SIG{WINCH} but I'm not seeing them catch the signal.

I'd like to be able to detect when a graceful stop or restart has been
requested so that I can add a Connection: close header to the response.


I am not the ultimate authority here, but I think you are going to have several problems with this idea. - the first one is that under Windows (where Apache also runs) there are no such signals. - the second one is that the signal, if signal there is, is probably addressed to the main Apache instance, not to the children processes. I am not sure that the Apache main process then tells the children to stop via a signal, or via some other mechanism. - assuming that a child process (or thread) has received (from the main Apache process) the order to terminate, it will do so after it finishes the current request, by which time it will be too late to add your header. But maybe I'm wrong with all of these. Let's wait for a guru here to comment..


Reply via email to