Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C40610413 for ; Fri, 27 Sep 2013 08:10:21 +0000 (UTC) Received: (qmail 2545 invoked by uid 500); 27 Sep 2013 08:10:07 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 2125 invoked by uid 500); 27 Sep 2013 08:09:56 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 2112 invoked by uid 99); 27 Sep 2013 08:09:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 08:09:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ivan@visualsvn.com designates 74.125.82.181 as permitted sender) Received: from [74.125.82.181] (HELO mail-we0-f181.google.com) (74.125.82.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 08:09:47 +0000 Received: by mail-we0-f181.google.com with SMTP id p61so2317780wes.12 for ; Fri, 27 Sep 2013 01:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=visualsvn.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=DPboUbvTbQz7+CSYBHcTA7kIchENRcinTw1Mg7jizrU=; b=U5u0dHlz6p1IIxMrvvov2KEAN2wPEc6CTofsSCzpH3SdotZEFnHz9447J97zhJ98SR 0jKWmFDtmNc1cGFNOA4RfxLCvtP0xor5zBCn0yHPo36+DoilZsKv9KYrqFEM6ajlSCit KwMutZdKVjJJldd9mXHs8BcJ687QwvHF6aW/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=DPboUbvTbQz7+CSYBHcTA7kIchENRcinTw1Mg7jizrU=; b=IRnxhqYgTp4j/azfcaycCssfgQWCUPX4lRyRZQkjyn+tsI3rbDPWKnL7llmpNFBmiq yx5KIotofd4kBjybcDNj6d8YP3IWa8H701FPJ31yeUoeu3Gw8SPMdiRjnN9+Rvox+05z HcOTv32Q/BNnW0XhoZjpQZCEGydGjs98zOx7q4KFsN0r8VRFbwM2H3sVO+LC76pSmJIL XIQq7/loRRxIUzTGF2zApr7gGMEW5UVe6Cewl1/4UquB6QF0pQczL3KSNS9nOQNtyKJz LXEbZEQLu0awnLa7l8UfBaTg0AesnITniagmFkfNWFVqNu+0IlQZMKjqObG2y6+ylQ4T JcJw== X-Gm-Message-State: ALoCoQnvUlsRAiZOXYRBauxaV6GmVx3HtksFKiafzzwe2AmsjKhpOg5AE8O43FDUDINvXLvemnGQ X-Received: by 10.180.39.212 with SMTP id r20mr1479948wik.13.1380269367358; Fri, 27 Sep 2013 01:09:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.56.35 with HTTP; Fri, 27 Sep 2013 01:09:06 -0700 (PDT) In-Reply-To: <20130926200833.B84E5238890B@eris.apache.org> References: <20130926200833.B84E5238890B@eris.apache.org> From: Ivan Zhakov Date: Fri, 27 Sep 2013 12:09:06 +0400 Message-ID: Subject: Re: svn commit: r1526666 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number server/mpm/winnt/child.c server/mpm/winnt/mpm_winnt.c server/mpm/winnt/mpm_winnt.h To: dev@httpd.apache.org, Jeff Trawick Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On 27 September 2013 00:08, wrote: > Author: trawick > Date: Thu Sep 26 20:08:33 2013 > New Revision: 1526666 > > URL: http://svn.apache.org/r1526666 > Log: > WinNT MPM: Exit the child if the parent process crashes or is terminated. > > Submitted by: Oracle, via trawick > > The original modification was made some years ago for Oracle HTTP Server > by an Oracle employee. trawick made additional changes for style and > for trunk/2.4.x changes. > [...] > Modified: httpd/httpd/trunk/CHANGES > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1526666&r1=1526665&r2=1526666&view=diff > ============================================================================== > --- httpd/httpd/trunk/CHANGES [utf-8] (original) > +++ httpd/httpd/trunk/CHANGES [utf-8] Thu Sep 26 20:08:33 2013 > @@ -1,6 +1,9 @@ > -*- coding: utf-8 -*- > Changes with Apache 2.5.0 > > + *) WinNT MPM: Exit the child if the parent process crashes or is terminated. > + [Oracle Corporation] > + > *) ldap: Support ldaps when using the Microsoft LDAP SDK. > PR 54626. [Jean-Frederic Clere] > > > Modified: httpd/httpd/trunk/docs/log-message-tags/next-number > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1526666&r1=1526665&r2=1526666&view=diff > ============================================================================== > --- httpd/httpd/trunk/docs/log-message-tags/next-number (original) > +++ httpd/httpd/trunk/docs/log-message-tags/next-number Thu Sep 26 20:08:33 2013 > @@ -1 +1 @@ > -2538 > +2539 > > Modified: httpd/httpd/trunk/server/mpm/winnt/child.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=1526666&r1=1526665&r2=1526666&view=diff > ============================================================================== > --- httpd/httpd/trunk/server/mpm/winnt/child.c (original) > +++ httpd/httpd/trunk/server/mpm/winnt/child.c Thu Sep 26 20:08:33 2013 > @@ -951,12 +951,12 @@ static void create_listener_thread(void) > } > > > -void child_main(apr_pool_t *pconf) > +void child_main(apr_pool_t *pconf, DWORD parent_pid) > { > apr_status_t status; > apr_hash_t *ht; > ap_listen_rec *lr; > - HANDLE child_events[2]; > + HANDLE child_events[3]; > HANDLE *child_handles; > int listener_started = 0; > int threads_created = 0; > @@ -966,6 +966,7 @@ void child_main(apr_pool_t *pconf) > DWORD tid; > int rv; > int i; > + int num_events; > > apr_pool_create(&pchild, pconf); > apr_pool_tag(pchild, "pchild"); > @@ -983,6 +984,15 @@ void child_main(apr_pool_t *pconf) > child_events[0] = exit_event; > child_events[1] = max_requests_per_child_event; > > + if (parent_pid != my_pid) { > + child_events[2] = OpenProcess(PROCESS_ALL_ACCESS, FALSE, parent_pid); > + num_events = 3; This handle never closed, but it's not a big problem since it's only one handle per process. PROCESS_ALL_ACCESS is very wide access and child could not have required permissions if compiled on Windows Vista [1]. It' better to request only required SYNCHRONIZE permission. -- Ivan Zhakov CTO | VisualSVN | http://www.visualsvn.com