Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 83927 invoked from network); 30 Mar 2009 07:54:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Mar 2009 07:54:28 -0000 Received: (qmail 37160 invoked by uid 500); 30 Mar 2009 07:54:28 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 37067 invoked by uid 500); 30 Mar 2009 07:54:27 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 37058 invoked by uid 99); 30 Mar 2009 07:54:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 07:54:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 07:54:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D7275238889F; Mon, 30 Mar 2009 07:54:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r759860 - /httpd/httpd/trunk/modules/mappers/mod_watchdog.c Date: Mon, 30 Mar 2009 07:54:06 -0000 To: cvs@httpd.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090330075406.D7275238889F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Mon Mar 30 07:54:05 2009 New Revision: 759860 URL: http://svn.apache.org/viewvc?rev=759860&view=rev Log: Run the callback from pool cleanup. This allows to break the blocked callbacks Modified: httpd/httpd/trunk/modules/mappers/mod_watchdog.c Modified: httpd/httpd/trunk/modules/mappers/mod_watchdog.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_watchdog.c?rev=759860&r1=759859&r2=759860&view=diff ============================================================================== --- httpd/httpd/trunk/modules/mappers/mod_watchdog.c (original) +++ httpd/httpd/trunk/modules/mappers/mod_watchdog.c Mon Mar 30 07:54:05 2009 @@ -76,6 +76,19 @@ { apr_status_t rv; ap_watchdog_t *w = (ap_watchdog_t *)data; + + if (w->is_running) { + watchdog_list_t *wl = w->callbacks; + while (wl) { + if (wl->status == APR_SUCCESS) { + /* Execute watchdog callback with STOPPING state */ + (*wl->callback_fn)(AP_WATCHDOG_STATE_STOPPING, + (void *)wl->data, w->pool); + wl->status = APR_EOF; + } + wl = wl->next; + } + } w->is_running = 0; apr_thread_join(&rv, w->thread); return rv;