From owner-freebsd-current@FreeBSD.ORG Wed Jul 16 20:45:04 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5BE1065674 for ; Wed, 16 Jul 2008 20:45:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id 02CBE8FC20 for ; Wed, 16 Jul 2008 20:45:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 18061 invoked by uid 399); 16 Jul 2008 20:45:03 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 16 Jul 2008 20:45:03 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <487E5DCD.3010206@FreeBSD.org> Date: Wed, 16 Jul 2008 13:45:01 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.14 (X11/20080606) MIME-Version: 1.0 To: Dan Nelson References: <487E533F.7050303@FreeBSD.org> <20080716201819.GB19044@dan.emsphone.com> In-Reply-To: <20080716201819.GB19044@dan.emsphone.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Heads Up: shutdown keyword added to 34 rc.d scripts. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 20:45:04 -0000 Dan Nelson wrote: > In the last episode (Jul 16), Doug Barton said: >> I've run with this locally for quite a while and just haven't had a >> chance to commit it. OTOH I don't use most of the stuff covered by >> this, so I'd like to get it tested in real world conditions for a >> while before it's MFC'ed. >> >> URL: http://svn.freebsd.org/changeset/base/180564 >> Log: >> ~ Add the shutdown KEYWORD to those scripts that start persistent >> ~ services to allow them to do a "clean" shutdown. >> >> ~ I purposely avoided making changes to network-related stuff since >> ~ the system shutting down is pretty conclusive, and there may be >> ~ complicated dependencies on the network that I would rather not try >> ~ to unravel. > > I think shutdown should be reserved for programs that save state > between instances or otherwise would cause a "cleanup" operation to run > then next time they are started after an unclean shutdown. That's not an unreasonable argument, however IMO it's better to be safe than sorry. > Adding > shutdown to things like amd, mountd, moused, etc. simply forces what > would be done in init's final SIGTERM sweep to be done sequentially > instead of in parallel. The ability to do things sequentially is a key benefit of the rc.d system. The fact that we have not been taking full advantage of that to date is (once again IMO) an oversight. > Also, if any of those daemons doesn't want to > immediately exit for some reason (amd hanging on a stuck mountpoint, > for example), it increases the likelyhood of the global shutdown timer > expiring and force-killing other daemons that might have wanted the > chance to shut down cleanly. That's a valid concern, which is why I want this to get real world testing before we consider MFC'ing it. As I said above, if this change causes real problems then those problems can easily be fixed. Doug -- This .signature sanitized for your protection