From owner-freebsd-questions Fri Feb 16 19: 7: 4 2001 Delivered-To: freebsd-questions@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id BEB1F37B65D for ; Fri, 16 Feb 2001 19:06:59 -0800 (PST) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.1/8.11.1) with SMTP id f1H36gh65006; Fri, 16 Feb 2001 22:06:43 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Fri, 16 Feb 2001 22:06:42 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Anish A Patankar Cc: freebsd-questions@FreeBSD.org Subject: Re: doubt about init process.. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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