Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2001 22:06:42 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Anish A Patankar <patankar@cse.Buffalo.EDU>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: doubt about init process..
Message-ID:  <Pine.NEB.3.96L.1010216220246.56503I-100000@fledge.watson.org>
In-Reply-To: <Pine.SOL.4.30.0102162130120.13152-100000@pollux.cse.Buffalo.EDU>

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

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.
> =============================================================================
> 
> Anish Patankar
> Graduate Teaching Assistant
> Computer Science and Engineering
> State University of New York at Buffalo
> Tel: O- (716) 645-3771
>      H- (716) 835-9951
> ============================================================================
> 
> 



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?Pine.NEB.3.96L.1010216220246.56503I-100000>