From owner-freebsd-rc@FreeBSD.ORG Wed Nov 16 17:38:58 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 CA0F61065670; Wed, 16 Nov 2011 17:38:58 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7E68FC16; Wed, 16 Nov 2011 17:38:58 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 9063F1DD638; Wed, 16 Nov 2011 18:38:56 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 6CEBA28468; Wed, 16 Nov 2011 18:38:56 +0100 (CET) Date: Wed, 16 Nov 2011 18:38:56 +0100 From: Jilles Tjoelker To: Andriy Gapon Message-ID: <20111116173856.GA31200@stack.nl> References: <4EC3E667.4080906@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EC3E667.4080906@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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:38:58 -0000 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. -- Jilles Tjoelker