Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2001 01:19:27 -0600
From:      "Josh Paetzel" <jpaetzel@hutchtel.net>
To:        "Robert Watson" <rwatson@FreeBSD.ORG>, "Anish A Patankar" <patankar@cse.Buffalo.EDU>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: doubt about init process..
Message-ID:  <00e801c098b2$089a3b60$6100000a@vladsempire.net>
References:  <Pine.NEB.3.96L.1010216220246.56503I-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Robert Watson" <rwatson@FreeBSD.ORG>
To: "Anish A Patankar" <patankar@cse.Buffalo.EDU>
Cc: <freebsd-questions@FreeBSD.ORG>
Sent: Friday, February 16, 2001 9:06 PM
Subject: Re: doubt about init process..


>
> Generally speaking, sending a source code question to two mailing
lists
> and to the entire core team individually addressed is considered to
be in
> somewhat poor taste.  We usually encourage systems programming
questions
> to be addressed to the freebsd-hackers mailing list.
>
> In answer to your question, I'm not sure off-hand.  My guess would
be that
> init runs with a signal handling set inherited from proc0, and proc0
is
> initialized to ignore all signals by default.  The signal handling
is
> probably reset for children processes by execsig() (or maybe it's
> sigexec()) in kern_sig.c, meaning that children processes will get a
> normal default signal set.  init probably also initializes handlers
for a
> set of basic signals to handle runlevel stuff.  This is all just a
guess
> -- the best way to find out for sure would be to read the source
code, or
> if you're into more experimental tactics, you could set a breakpoint
using
> the kernel debugger in one of the init_main() routines associated
with
> starting up init, and check the signal masks there to see whether
they're
> reset or initialized during the fork performed on proc0.
>
> Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
> robert@fledge.watson.org      NAI Labs, Safeport Network Services
>
> On Fri, 16 Feb 2001, Anish A Patankar wrote:
>
> >
> > The init process on FreeBSD is a user-level process (as opposed to
> >    a kernel-level process) that, other than having been started by
the
> > kernel
> >    itself as part of system startup, reacts just like any other
process on
> >    the system.  However if you send init the SIGKILL signal, even
as root,
> >    init does not die? Can you please tell me why this is so??
> > Thanks
> > Anish.

Killing init does essentially kills the system.  Unlike a traditional
Unix system, FreeBSD does not allow anyone to kill init, as there are
more graceful ways to shut the system down.  It's a feature, not a
bug.

Josh



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00e801c098b2$089a3b60$6100000a>