From owner-freebsd-rc@FreeBSD.ORG Wed Nov 16 17:54:56 2011 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97B9A1065673 for ; Wed, 16 Nov 2011 17:54:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E728E8FC0C for ; Wed, 16 Nov 2011 17:54:55 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA27423; Wed, 16 Nov 2011 19:54:53 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <4EC3F8EC.2010005@FreeBSD.org> Date: Wed, 16 Nov 2011 19:54:52 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jilles Tjoelker References: <4EC3E667.4080906@FreeBSD.org> <20111116173856.GA31200@stack.nl> In-Reply-To: <20111116173856.GA31200@stack.nl> X-Enigmail-Version: undefined Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: KEYWORD: shutdown X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2011 17:54:56 -0000 on 16/11/2011 19:38 Jilles Tjoelker said the following: > On Wed, Nov 16, 2011 at 06:35:51PM +0200, Andriy Gapon wrote: >> I am new to all the rc stuff, so please pardon me if I am asking >> something obvious or silly. What are the main reasons to _not_ have >> the "shutdown" keyword in an rc script? What are the examples / >> usages? > > Traditionally only very few scripts had "shutdown", leaving most of the > cleanup to the SIGTERM and SIGKILL from init. > > Because it was fairly complicated to get this right (for example, a > database server needs "shutdown" but also all programs that use it), a > few years ago it was decided to add "shutdown" everywhere. The slower > shutdown (a few seconds at most on machines with decent CPUs, but > possibly rather more on slow embedded machines) was accepted. > So nowadays (or "if I got to do it again") it would make more sense to have "shutdown" as a default and add "noshutdown" for some hypothetical special cases? -- Andriy Gapon