apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <...@apache.org>
Subject Re: [PATCH] HUP on bug 45930 (CGI and signal masks)
Date Sat, 11 Sep 2010 00:34:20 GMT
On Thu, 9 Sep 2010 01:37:32 +0100
John Sullivan <johns@chiark.greenend.org.uk> 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

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

View raw message