[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] catch "serious" signals SIGSEGV, SIGBUS, e
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] catch "serious" signals SIGSEGV, SIGBUS, etc. |
Date: |
Sat, 27 Oct 2012 17:11:06 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Sat, Oct 27, 2012 at 10:24:09AM -0400, Felix wrote:
> The attached patch adds signal handling for the "serious" signals
> mentioned above. This is quite useful, since it makes it possible
> to generate a call-trace on errors that would normally just abort
> the process. In "csi", the REPL will be reentered.
>
> Setting user-level signal handlers for these signals is not allowed,
> as they the runtime-system needs to do some special processing for
> these, but the exceptions thrown as a result of the signals can be
> caught with the normal exception-handling procedures.
>
> Recursive invocations of the signal handler (which would mean
> something is seriously broken, like an inconsistent heap) will still
> abort the process (this is also required to avoid having to siglongjmp
> out of the recursive handler, which is undefined according to
> POSIX).
>
> The runtime option "-:S" can be used to disable setting up handlers
> for these signals.Ã
>
> THe patch also adds "signal/bus", which was missing from the
> "posix" unit.
Cool, thanks. I've pushed it.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth