On Tue, 29 Sep 2009, Dag-Erling Smørgrav wrote: > 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. I could be convinced by an argument that reboot and shutdown -r should be the same, and that both should talk to init, which should perform the reboot system call. Since init is what runs rc.shutdown, and it already knows if it's in multiuser mode (since it defines multiuser mode), it should be able to DRT. My belief is that most people who type in "reboot" do so thinking it means the same thing as "shutdown -r ". Robert N M Watson Computer Laboratory University of CambridgeReceived on Tue Sep 29 2009 - 12:43:49 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:56 UTC