Subject: Re: CVS commit: basesrc: shutdown -T
To: Jaromir Dolecek <>
From: Christoph Badura <>
List: tech-userlevel
Date: 07/24/2000 01:09:29
On Thu, Jul 20, 2000 at 10:33:59AM -0700, Jaromir Dolecek wrote:
> Module Name:	basesrc
> Committed By:	jdolecek
> Date:		Thu Jul 20 17:33:58 UTC 2000
> Modified Files:
> 	basesrc/sbin/shutdown: shutdown.8 shutdown.c
> Log Message:
> when running /etc/rc.shutdown, don't want on it until it completes
> indefinitely - by default, wait maximum of 300 seconds only
> the timeout is settable via new -T flag
> Adjust history to mention addition of shutdown hooks and -T option on manpage
> This fixes bin/10637.

Uhm, you never demonstrated that this is actually a bug.  In fact, that
was a deliberate design decision.

One reason for running rc.shutdown is to bring the system into a defined
state before rebooting.  Killing the shutdown script after an effectively
random amount of time (with a SIGKILL even!) is not compatible with that goal.
shutdown(8) has no way to determine whether it is "safe" to kill the
rc.shutdown process.

Also, you have two perfectly viable alternatives to handle the situation:
a) fix the buggy rc.d script to not hang.
b) interrupt shutdown, e.g. by sending a SIGINT.

If you don't care about bringing the system down in an orderly manner
you have several options already (e.g. use reboot(8) or don't run
rc.shutdown).  Making it virtually impossible to shut down the system
in an orderly manner is not acceptable.

In short, this change is bogus and should be backed out.