Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 1997 12:43:55 +0000 (GMT)
From:      Adam David <adam@veda.is>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: reboot(8) and slow-dying processes
Message-ID:  <199701221243.MAA01343@veda.is>
In-Reply-To: <Mutt.19970122091551.j@uriah.heep.sax.de> from J Wunsch at "Jan 22, 97 09:15:51 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <adam@veda.is>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701221243.MAA01343>