httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaysingh Samuel <jayasingh.sam...@hotmail.com>
Subject RE: Deregister and register a single module on passing signal..
Date Tue, 21 Apr 2009 04:00:52 GMT

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. 

> Date: Mon, 20 Apr 2009 09:21:58 -0400
> Subject: Re: Deregister and register a single module on passing signal..
> From: covener@gmail.com
> To: modules-dev@httpd.apache.org
> 
> On Sun, Apr 19, 2009 at 11:58 PM, Jaysingh Samuel
> <jayasingh.samuel@hotmail.com> wrote:
> 
>> 1. If iam passing a SigUSR2 signal to the parent process, then will i be able to
reload/rerun only my custom Modules,  without reading the config file ?.
> 
> No, all the modules are reloaded and the config is re-parsed.
> 
> -- 
> Eric Covener
> covener@gmail.com

_________________________________________________________________
The new Windows Live Messenger. You don’t want to miss this.
http://www.microsoft.com/india/windows/windowslive/messenger.aspx
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message