Re: x86: SIGTRAP handling differences from 2.4 to 2.6

From: Linus Torvalds
Date: Sat Nov 22 2003 - 17:48:53 EST



On Sun, 23 Nov 2003, Paul Mackerras wrote:
>
> In this case the signal would not actually be set to be blocked or
> ignored but would end up being ignored because of the rule that "init
> gets no signals it doesn't want". I would prefer to see
> thread-synchronous signals kill init if they are not handled, so that
> at least we get a panic with a message that says what went wrong
> rather than the system just spinning its wheels uselessly.

Hmm.. Right now the init special case is in the signal _delivery_ path,
which makes it hard to do something like that, since by then we no longer
know/care who sent the signal.

We could move the special case into the send path instead (and then only
do it for "external signals" and not special case init at all for internal
signals).

Hmm.. Looking at the signal sending code, we actually do special-case
"init" there already - but only for the "kill -1" case. If the test for
"pid > 1" was moved into "group_send_sig_info()" instead, that would
pretty much do it, I think.

Feel free to try something like that out. I'm not going to apply it right
now, though ;)

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/