On Nov 3, 1:56 pm, sc...@slp53.sl.home (Scott Lurndal) wrote:

> While I do agree with you regarding the signals, I'll point out that
> the original bourne shell used SIGSEGV to extend its heap. Not that
> I would advocate such a thing myself....

I've written some programs that deliberately genearate a SIGSEGV in
code that has to be runtime patched based on whether it's running on a
single-CPU system or an SMP system. However, the first thing the
SIGSEGV handler does is check if this is an *intended* SIGSEGV. If
not, it terminates.

It is not possible to recover from an unexpected SIGSEGV inside the
same context that generated the SIGSEGV. You need to terminate the
contaminated process and do the recovery in a context that is isolated
from whatever fault caused the SIGSEGV.