httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Abo <t...@hitech.com>
Subject Cleanup when server is stopped vs reconfigured
Date Tue, 29 Mar 2016 01:01:48 GMT
I have a DSO module which establishes a custom handler. The handle fires up external process
which perform the work for certain requests. Those processes contain a lot of state information
for user application sessions. We want to have some cleanup code that will shutdown those
processes cleanly if the Apache server is stopped.
 
I thought I had solved this problem by registering my cleanup handler on the pool which is
passed to my register_hooks function. This does get called when the server is stopped. The
problem is, it also gets called when the server is reconfigured (i.e. with apachectl graceful).
Our system administrators want to use graceful to update minor configuration directives or
rotate log files from time to time and feel strongly that they should be able to do so without
disrupting our user sessions.
 
So after a few hours of reviewing the source code, I am throwing in the towel. I am going
to ask the geniuses:
 
Is there a way to run some cleanup code in a module when the server is being stopped, but
not being restarted? Or, can a cleanup handler in a loaded module determine whether the server
is being shut down or restarted?
 
Thanks very much
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message