[PATCH] Shutdown cooloff feature

Dag-Erling Smørgrav des at des.no
Tue Sep 29 13:05:08 UTC 2009


Ivan Voras <ivoras at freebsd.org> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > [...] shutdown(8) sends either SIGINT, SIGUSR or SIGUSR2 to init(8),
> > which runs /etc/rc.shutdown before killing all remaining processes
> > and either reboot / halt or start a single-user shell, while
> > reboot(8) and halt(8) send SIGTSTP to init(8), then SIGTERM to every
> > other process in the system, then SIGKILL to any process that hasn't
> > responded to SIGTERM after somewhere between five and sixty seconds,
> > before issuing a reboot(2) syscall.
> Is this distinction between them useful (other than possibly speed of
> shutdown/reboot)?

Good question.  You definitely want to run rc.shutdown in the common
case (multi-user mode), but running it in single-user mode may have
unintended consequences.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-current mailing list