Re: x86: SIGTRAP handling differences from 2.4 to 2.6

From: H. Peter Anvin
Date: Sun Nov 23 2003 - 01:23:43 EST


Followup to: <Pine.LNX.4.44.0311221435090.2379-100000@xxxxxxxxxxxxx>
By author: Linus Torvalds <torvalds@xxxxxxxx>
In newsgroup: linux.dev.kernel
>
> 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.
>

Okay... I'm going to ask the obvious dumb question:

Why do we bother special-casing init at all?

It seems the only things init can't ask the kernel to do already for
it is to block SIGSTOP and SIGKILL, and it seems that if you killed
(or stopped?) init you should just get the kernel panic.

If there is anything that should be special-cased, then perhaps it
should be that init should be allowed to block/catch/ignore
SIGSTOP/SIGKILL. Perhaps that should be a capability?

-hpa
--
<hpa@xxxxxxxxxxxxx> at work, <hpa@xxxxxxxxx> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
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/