Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 63081 invoked from network); 21 Apr 2009 04:15:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Apr 2009 04:15:47 -0000 Received: (qmail 5058 invoked by uid 500); 21 Apr 2009 04:15:46 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 4994 invoked by uid 500); 21 Apr 2009 04:15:46 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 4984 invoked by uid 99); 21 Apr 2009 04:15:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2009 04:15:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of saju.pillai@gmail.com designates 209.85.146.180 as permitted sender) Received: from [209.85.146.180] (HELO wa-out-1112.google.com) (209.85.146.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2009 04:15:37 +0000 Received: by wa-out-1112.google.com with SMTP id l35so1114072waf.24 for ; Mon, 20 Apr 2009 21:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=PD3JE2vcTI/IYd57NH4SQQwWvXB9D4FT8VX5UpkfBgo=; b=u3RZMk2Wfm6ByvrxqqhT0BQHicD0kwrj28lb25L2YnCA+xi+GIKY6Zu1Qn8d98mcWM aHaKvKOZDbfcpiOHe6phL8pEl7Mh5xpHmckIdD+aI6I6FvddTh0hXHEZ/aboZHkt0i5Q i4Jbz2c3pajww5VSv7kTnMpl0xaLS7Ma7reYE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=A37spGWLM5PaMUsVLCtuverXPwu7MHmQDo3Daz8bUFiLtiwKCnBQlmYjmCHkqLYZOt klo6Rw2bILf7PVoOe7e26N7U/R7X7B2+P+adQ6X0b6V8tJXbRZzbpgWGCshjIUfVctcl 5k3vu5Kl2DvDdXMCKCZlJVqW7NijSoACx7zLE= Received: by 10.114.67.17 with SMTP id p17mr3710385waa.203.1240287315649; Mon, 20 Apr 2009 21:15:15 -0700 (PDT) Received: from cairo.local ([122.172.54.217]) by mx.google.com with ESMTPS id m17sm8545875waf.31.2009.04.20.21.15.13 (version=SSLv3 cipher=RC4-MD5); Mon, 20 Apr 2009 21:15:15 -0700 (PDT) Message-ID: <49ED484B.9010704@gmail.com> Date: Tue, 21 Apr 2009 09:45:07 +0530 From: Saju Pillai User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: Deregister and register a single module on passing signal.. References: <1404e5910904200621v6ae71a54y4ccea9e6bfdc9fdf@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 ? -srp