Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 6846 invoked from network); 15 May 2009 18:04:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 May 2009 18:04:10 -0000 Received: (qmail 10438 invoked by uid 500); 15 May 2009 18:04:09 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 10348 invoked by uid 500); 15 May 2009 18:04:09 -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 10339 invoked by uid 99); 15 May 2009 18:04:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 18:04:09 +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; Fri, 15 May 2009 18:04:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 642C62388854; Fri, 15 May 2009 18:03:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r775266 - /httpd/httpd/trunk/server/mpm/winnt/service.c Date: Fri, 15 May 2009 18:03:45 -0000 To: cvs@httpd.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090515180345.642C62388854@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Fri May 15 18:03:44 2009 New Revision: 775266 URL: http://svn.apache.org/viewvc?rev=775266&view=rev Log: Pick up earlier SHUTDOWN notification Modified: httpd/httpd/trunk/server/mpm/winnt/service.c Modified: httpd/httpd/trunk/server/mpm/winnt/service.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/service.c?rev=775266&r1=775265&r2=775266&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/winnt/service.c (original) +++ httpd/httpd/trunk/server/mpm/winnt/service.c Fri May 15 18:03:44 2009 @@ -254,9 +254,10 @@ if (globdat.hServiceStatus) { if (currentState == SERVICE_RUNNING) { - globdat.ssStatus.dwWaitHint = 0; - globdat.ssStatus.dwCheckPoint = 0; - globdat.ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; + ctx->ssStatus.dwWaitHint = 0; + ctx->ssStatus.dwCheckPoint = 0; + ctx->ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP + | SERVICE_ACCEPT_SHUTDOWN; } else if (currentState == SERVICE_STOPPED) { globdat.ssStatus.dwWaitHint = 0; @@ -331,7 +332,9 @@ static VOID WINAPI service_nt_ctrl(DWORD dwCtrlCode) { - if (dwCtrlCode == SERVICE_CONTROL_STOP) + /* SHUTDOWN is offered before STOP, accept the first opportunity */ + if ((dwCtrlCode == SERVICE_CONTROL_STOP) + || (dwCtrlCode == SERVICE_CONTROL_SHUTDOWN)) { ap_signal_parent(SIGNAL_PARENT_SHUTDOWN); ReportStatusToSCMgr(SERVICE_STOP_PENDING, NO_ERROR, 30000);