All of lore.kernel.org
 help / color / mirror / Atom feed
From: jw schultz <jw@pegasys.ws>
To: linux-kernel@vger.kernel.org
Subject: Re: x86: SIGTRAP handling differences from 2.4 to 2.6
Date: Mon, 24 Nov 2003 15:57:24 -0800	[thread overview]
Message-ID: <20031124235724.GH5873@pegasys.ws> (raw)
In-Reply-To: <Pine.LNX.4.44.0311230954460.17378-100000@home.osdl.org>

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@pegasys.ws

		Remember Cernan and Schmitt

      reply	other threads:[~2003-11-24 23:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-22 18:29 x86: SIGTRAP handling differences from 2.4 to 2.6 Daniel Barlow
2003-11-22 19:02 ` Linus Torvalds
2003-11-22 22:19   ` Paul Mackerras
2003-11-22 22:40     ` Linus Torvalds
2003-11-23  6:21       ` H. Peter Anvin
2003-11-23 17:59         ` Linus Torvalds
2003-11-24 23:57           ` jw schultz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031124235724.GH5873@pegasys.ws \
    --to=jw@pegasys.ws \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.