Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4C3B537E1 for ; Fri, 6 May 2011 13:36:13 +0000 (UTC) Received: (qmail 16997 invoked by uid 500); 6 May 2011 13:36:13 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 16944 invoked by uid 500); 6 May 2011 13:36:13 -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 16937 invoked by uid 99); 6 May 2011 13:36:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 13:36:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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, 06 May 2011 13:36:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C8BD92388901; Fri, 6 May 2011 13:35:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1100211 - in /httpd/httpd/branches/2.2.x: STATUS server/mpm/winnt/mpm_winnt.c Date: Fri, 06 May 2011 13:35:49 -0000 To: cvs@httpd.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110506133549.C8BD92388901@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: trawick Date: Fri May 6 13:35:49 2011 New Revision: 1100211 URL: http://svn.apache.org/viewvc?rev=1100211&view=rev Log: Grab r1090634 from trunk: don't try to shut down child if it wasn't created (or, fix warning about reference to uninitialized variable child_exit_event) Reviewed by: wrowe, covener Modified: httpd/httpd/branches/2.2.x/STATUS httpd/httpd/branches/2.2.x/server/mpm/winnt/mpm_winnt.c Modified: httpd/httpd/branches/2.2.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1100211&r1=1100210&r2=1100211&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/STATUS (original) +++ httpd/httpd/branches/2.2.x/STATUS Fri May 6 13:35:49 2011 @@ -103,11 +103,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: http://people.apache.org/~trawick/mingw_patch_warnings.txt +1: trawick, wrowe, covener - * WinNT MPM: don't try to shut down child if it wasn't created - Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1090634 - 2.2.x patch: Trunk patch applies with offset - +1: trawick, wrowe, covener - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] Modified: httpd/httpd/branches/2.2.x/server/mpm/winnt/mpm_winnt.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/mpm/winnt/mpm_winnt.c?rev=1100211&r1=1100210&r2=1100211&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/server/mpm/winnt/mpm_winnt.c (original) +++ httpd/httpd/branches/2.2.x/server/mpm/winnt/mpm_winnt.c Fri May 6 13:35:49 2011 @@ -854,13 +854,14 @@ static int create_process(apr_pool_t *p, static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_event) { int rv, cld; + int child_created; int restart_pending; int shutdown_pending; HANDLE child_exit_event; HANDLE event_handles[NUM_WAIT_HANDLES]; DWORD child_pid; - restart_pending = shutdown_pending = 0; + child_created = restart_pending = shutdown_pending = 0; event_handles[SHUTDOWN_HANDLE] = shutdown_event; event_handles[RESTART_HANDLE] = restart_event; @@ -875,6 +876,9 @@ static int master_main(server_rec *s, HA shutdown_pending = 1; goto die_now; } + + child_created = 1; + if (!strcasecmp(signal_arg, "runservice")) { mpm_service_started(); } @@ -969,6 +973,10 @@ die_now: int timeout = 30000; /* Timeout is milliseconds */ winnt_mpm_state = AP_MPMQ_STOPPING; + if (!child_created) { + return 0; /* Tell the caller we do not want to restart */ + } + /* This shutdown is only marginally graceful. We will give the * child a bit of time to exit gracefully. If the time expires, * the child will be wacked.