You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stefan Fritsch <sf...@sfritsch.de> on 2011/07/24 20:25:09 UTC
When to install signal handlers
Hi,
the Unix MPMs detach from the console in the pre-config hook but
install their signal handlers (including the one for SIG_SEGV) only
later, in the mpm hook. If a segfault happens in this time period, the
segfault will not be visible on the console, won't be reported to the
script starting httpd, and won't be logged in the error log. This can
be somewhat confusing to users. I have seen this once with a mod_php
bug.
Does anybody remember if there is a reason why the signal handlers are
installed that late? Or can the code simply be moved to the pre-config
hook, before detaching?
Cheers,
Stefan
Re: When to install signal handlers
Posted by Greg Ames <am...@gmail.com>.
I don't remember any discussions on the subject or reasons why the timing is
as late as it is. I assume signal handlers are cloned by the fork(). ++1 to
eliminating silent failures.
Greg
On Sun, Jul 24, 2011 at 2:25 PM, Stefan Fritsch <sf...@sfritsch.de> wrote:
> Hi,
>
> the Unix MPMs detach from the console in the pre-config hook but
> install their signal handlers (including the one for SIG_SEGV) only
> later, in the mpm hook. If a segfault happens in this time period, the
> segfault will not be visible on the console, won't be reported to the
> script starting httpd, and won't be logged in the error log. This can
> be somewhat confusing to users. I have seen this once with a mod_php
> bug.
>
> Does anybody remember if there is a reason why the signal handlers are
> installed that late? Or can the code simply be moved to the pre-config
> hook, before detaching?
>
> Cheers,
> Stefan
>