From owner-freebsd-hackers Wed Jan 22 04:36:10 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA02223 for hackers-outgoing; Wed, 22 Jan 1997 04:36:10 -0800 (PST) Received: from veda.is (ubiq.veda.is [193.4.230.60]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA02217 for ; Wed, 22 Jan 1997 04:36:06 -0800 (PST) Received: (from adam@localhost) by veda.is (8.8.4/8.7.3) id MAA01343; Wed, 22 Jan 1997 12:43:56 GMT From: Adam David Message-Id: <199701221243.MAA01343@veda.is> Subject: Re: reboot(8) and slow-dying processes In-Reply-To: from J Wunsch at "Jan 22, 97 09:15:51 am" To: joerg_wunsch@uriah.heep.sax.de Date: Wed, 22 Jan 1997 12:43:55 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > reboot(8) is very unforgiving in that it only allows 5 seconds for > > processes to tidy up and exit gracefully, but there may be processes > > that need a longer delay before they are slaughtered as a last > > resort (for instance large database applications). > > The projected solution to this is rc.shutdown, with an adjustable > `grace time' (maximum period init should wait for the processes to > complete shutting down). > joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Okay, that looks good. The situation at the moment is rather horrendous and there is inconsistency in how this is implemented (comparing reboot and init). 'reboot' reboot: SIGTERM and wait 5 seconds reboot: SIGKILL up to 5 times, waiting 2,4,6,8,10 seconds respectively kill(1, SIGTERM) init: SIGHUP and wait for up to 10 seconds init: SIGTERM and wait for up to 10 seconds init: SIGKILL and wait for up to 10 seconds reboot always waits the fixed time, but init only waits while there are still unfinished processes. reboot does not send a SIGHUP but init does. Jörg, are you saying that a hook to rc.shutdown is needed for both programs, or that reboot will eventually become a control panel for init? (perhaps also /etc/init.conf to adjust the defaults) -- Adam David