httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saju Pillai <>
Subject Re: Deregister and register a single module on passing signal..
Date Tue, 21 Apr 2009 04:15:07 GMT
Jaysingh Samuel wrote:
> Eric, 
> Thanks for your reply, let me make my question clear.. 
> I have one Custom module, which i want to reload every 10mins, when i give graceful then
it reloads all the modules and also the config directives. Because of this i want to have
an option in the httpd say "reloadcustom" which takes signal Sigusr2 and have to reload only
the custom modules i have without reading the config Directives and should gracefully start
the apache.
> The only difference between the graceful and my reloadcustom should be that the reloadcustom
will have to reload only custom modules without reading the config directives.
> I tried to do this by directly calling the post_config on my custom_module in the worker.c
after getting the reloadcustom signal but i see memory Leaks because of this, the following
are the sample code. 
> Worker.cstatic void server_main_loop(int remaining_children_to_start){              
int child_slot;    apr_exit_why_e exitwhy;    int status, processed_status;    apr_proc_t
pid;    int i;                    while (!restart_pending && !shutdown_pending) {
       /*            Parent process            childen to finish up and spawns new children.
       */        if (is_reload == 1) {            Here i called my custom_module post config
function.            /* wake up the children...time to die.*/           ap_mpm_pod_killpg(pod,
ap_daemons_limit, TRUE);           is_reload = 0;        }        ap_wait_or_timeout(&exitwhy,
&status, &pid, pconf);}
> Please let me your suggestion on this. 
> Thanks in advance, Jaysingh Samuel. 

httpd does not support what you are trying to do. Maybe what you really 
want is a FastCGI style process that can manage it's lifecycle 
independent of apache ?


View raw message