From owner-cvs-all Tue Mar 27 12:41:33 2001 Delivered-To: cvs-all@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 54E1337B718; Tue, 27 Mar 2001 12:41:23 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id GAA03421; Wed, 28 Mar 2001 06:41:19 +1000 (EST) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37645) with ESMTP id <01K1PYMO1PG0S3CYMH@cim.alcatel.com.au>; Wed, 28 Mar 2001 06:41:17 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f2RKfFK45507; Wed, 28 Mar 2001 06:41:15 +1000 (EST envelope-from jeremyp) Content-return: prohibited Date: Wed, 28 Mar 2001 06:41:15 +1000 From: Peter Jeremy Subject: Re: cvs commit: src/sbin/reboot reboot.c In-reply-to: ; from rwatson@FreeBSD.ORG on Mon, Mar 26, 2001 at 08:42:04PM -0500 To: Robert Watson Cc: John Baldwin , cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Mail-Followup-To: Robert Watson , John Baldwin , cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Message-id: <20010328064115.Q26138@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2001-Mar-26 20:42:04 -0500, Robert Watson wrote: > >On Mon, 26 Mar 2001, John Baldwin wrote: > >> Since reboot will still need the code for the fallback case, this >> doesn't avoid any of the code duplication. This would just be more work >> than what we have now w/o any gain that I can see. :-P If you want to >> share the code, stick it in a library. > >Well, my feeling was that part of the potential to "stick" init comes from >the complex shutdown procedure. Maybe we need to just assert more >strongly that neither "reboot" nor "halt" provides a "gentle" shutdown, >and stick with the current signalling technique (not attempt to run any >more complex shutdown code), perhaps spacing the time periods a little >more. I.e., the status quo is right, modulo a bit of tweaking. If init gets stuck as a result of the process killing approach[1], then halt/reboot are likely to fall into the same knot. The logical extension is that one command does the gentle shutdown approach and the other command just calls reboot(2) without attempting to kill processes. I dislike situations where two different processes implement basically the same functionality in different ways. [1] I have seen commercial Unices where processes can get into a state where attempting to kill them will wedge the process issuing the kill(2). Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message