tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: avoid spinning processes when catching SEGV/BUS/FPE



>> This has also the unfortunate side effect that makes the problem
>> undebuggable (aside from wasting CPU resources).  The following
>> patch fixes that.

> Been there, tried to debug that - evil!

> Could we auto-restore the signal handler when it returns?  We would
> seriously alter behaviour for many apps otherwise, won't we?

> But maybe I misread your patch.

Well, maybe I misread it too.  But, as I read it, it resets the status
of the signal only for the nested signal, it applies to only the
signals that typically reflect hardware traps (SIGSEGV, SIGFPE, etc),
and only when generated from those harwdare traps (the code is in
trapsignal()).  Thus, the nested signal will always kill the process
(usually with a coredump) and there is no "when it returns".

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index