Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 96656 invoked from network); 11 Sep 2010 00:34:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Sep 2010 00:34:54 -0000 Received: (qmail 28672 invoked by uid 500); 11 Sep 2010 00:34:54 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 28585 invoked by uid 500); 11 Sep 2010 00:34:53 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 28578 invoked by uid 99); 11 Sep 2010 00:34:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Sep 2010 00:34:53 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=FSL_HELO_NON_FQDN_1,HELO_NO_DOMAIN,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [80.229.52.226] (HELO baldur) (80.229.52.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Sep 2010 00:34:48 +0000 Received: from baldur (localhost [127.0.0.1]) by baldur (Postfix) with ESMTP id E3D0AC265205 for ; Sat, 11 Sep 2010 01:34:23 +0100 (BST) Date: Sat, 11 Sep 2010 01:34:20 +0100 From: Nick Kew To: dev@apr.apache.org Subject: Re: [PATCH] HUP on bug 45930 (CGI and signal masks) Message-ID: <20100911013420.6cd67f68@baldur> In-Reply-To: <20100909003732.GA13715@chiark.greenend.org.uk> References: <20100909003732.GA13715@chiark.greenend.org.uk> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 9 Sep 2010 01:37:32 +0100 John Sullivan wrote: > I originally submitted against the specific httpd version I reproduced > and tested the patch under. It was then reassigned to APR HEAD, > presumably by a httpd reviewer because that's where the necessary > code changes are. OK, I've reviewed it in more detail. Your basic point is well-made: the signal mask should be reset before calling an external program. However, this is not a threads vs no threads issue, and if we're to fix it, we should reset signals in threaded and non-threaded builds alike. The fact that it only affects threaded MPMs in HTTPD is coincidental. You've actually highlighted rather more issues in threadproc/unix/signals.c. There's some rather confused use of constructs like #if !APR_HAS_THREADS sigprocmask #else thread_sigmask #endif within code that is entirely wrapped in #if APR_HAS_THREADS Also some int values from system functions are being returned as apr_status_t so I expect there are edge-case bugs lurking in the error handling. Pending a more complete review of signals.c, (time permitting) I'm not going to apply this patch. Sorry. Not your fault I'm not happy! -- Nick Kew