From: Linus Benedict Torvalds (torvalds@klaava.Helsinki.FI)
Date: 05/18/92


From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
Subject: Re: gdb postmortem debugging...
Date: 18 May 1992 14:25:34 GMT

In article <1992May18.123608.8795@fwi.uva.nl> lankeste@fwi.uva.nl (Branko Lankester) writes:
>
>You can replace do_exit(11) in die() in kernel/traps.c with
>send_sig(SIGSEGV, current, 0), linux versions before 0.96 had
>to use do_exit() because the old trap handlers didn't do signal
>recognition.

Yes, this will fix the problem, but it's not completely safe: if the
error occurs in the kernel, it will probably lock up. Most of the
errors occur in user space, but if syscalls are given bad arguments or
similar you can induce general protection errors in kernel space:
send_sig will not work in that case, while do_exit() always terminates
the process cleanly (but doesn't work for gdb).

                Linus