Re: x86: SIGTRAP handling differences from 2.4 to 2.6

From: jw schultz
Date: Mon Nov 24 2003 - 18:59:07 EST


On Sun, Nov 23, 2003 at 09:59:47AM -0800, Linus Torvalds wrote:
>
> On 22 Nov 2003, H. Peter Anvin wrote:
> >
> > Okay... I'm going to ask the obvious dumb question:
> >
> > Why do we bother special-casing init at all?
>
> Because the kernel depends on it existing. "init" literally _is_ special
> from a kernel standpoint, because its' the "reaper of zombies" (and, may I
> add, that would be a great name for a rock band).
>
> So without init, the kernel wouldn't have anybody to fall back on when a
> parent process dies, and would become very very unhappy. Historically it
> actually oopsed the kernel.
>
> UNIX semantics literally _require_ that "getppid()" should return 1 if
> your parent dies, and that's "current->p_parent->tgid". So we have to have
> a parent with pid 1, and thus init really _is_ special.
>
> Yeah, we could have _other_ special cases (we could create another process
> that is invisible and has pid 1), but the fact is, _some_ special case is
> required. It might as well be "you can't kill init".

For a normal init where is pretty bullet resistant having it
unkillable makes sense. If init were somehow to go
pathological the whole system is suspect.

On the other hand, there are some who run something besides
the usual init. In that case it might make sense to allow
init to respawn. -- speculation only.

--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@xxxxxxxxxx

Remember Cernan and Schmitt
-
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/