From owner-freebsd-current Tue Mar 25 14:04:29 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA13622 for current-outgoing; Tue, 25 Mar 1997 14:04:29 -0800 (PST) Received: from isbalham.ist.co.uk (isbalham.ist.co.uk [192.31.26.1]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA13586 for ; Tue, 25 Mar 1997 14:04:05 -0800 (PST) Received: from gid.co.uk (uucp@localhost) by isbalham.ist.co.uk (8.8.4/8.8.4) with UUCP id VAA17448; Tue, 25 Mar 1997 21:46:21 GMT Date: Tue, 25 Mar 1997 21:49:03 GMT Received: from [194.32.164.2] by seagoon.gid.co.uk; Tue, 25 Mar 1997 21:49:03 GMT X-Sender: rb@194.32.164.1 Message-Id: In-Reply-To: <199703250234.NAA06930@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Bruce Evans From: Bob Bishop Subject: Re: 2.2R (src 2.2 211): == dialing Cc: freebsd-current@freebsd.org, joerg_wunsch@uriah.heep.sax.de, terry@lambert.org Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 2:34 am -0000 25/3/97, Bruce Evans wrote: >This has nothing to do with POSIX signals... Oh, OK, I'll come out of my sulk now :-) >...or process groups. It is much >simpler. It is mostly documented in init(8): > >1. If someone hits Ctrl-Alt-Del, then a SIGINT is usually sent to init. >2. Init shuts down and reboots when it receives a SIGINT. >3. Init shuts things down by broadcasting signals of increasing severity > { SIGHUP, SIGTERM, SIGKILL }. >4. Some process like ppp do bad things when they receive a SIGHUP. > >This differs from when the system is shut down using reboot(8). reboot >shuts things down by broadcasting signals of increasing severity >{ SIGTERM, SIGKILL }. I don't know why init broadcasts SIGHUP... That I can tell you: interactive shells don't respond to SIGTERM. OTOH, init shouldn't send SIGHUP to daemons (ie sessions with no controlling tty) because they mostly take HUP to mean "reread your config". >...or why reboot doesn't just signal init. Good question; as it stands, it appears that reboot will always SIGKILL interactive shells (which ignore TERM); under unfavourable circumstances this could eg leave modems in strange states. -- Bob Bishop (0118) 977 4017 international code +44 118 rb@gid.co.uk fax (0118) 989 4254 between 0800 and 1800 UK