Another bug in halt.c

bruner bruner
Wed Nov 17 21:38:17 AEST 1982


Our PDP-11 "init" was locally modified to perform shutdowns.  It
kills everyone off; first with a signal 15 and then (after 15
seconds) with a sequence of signal 9's.  It then prints a message
to the console, turns off accounting, does a sync() and exits.
[It has to turn off accounting to prevent the final accounting
record from being written after the last sync().]

A different signal causes "init" to inititate a reboot after
everything has been killed.  (The reboot is done by a user-mode
program via "phys"; it's dirty but it works very well.)

When any of our systems is rebooted, the "/etc/rc" file looks for
the file "/down".  If "/down" exists it is removed and the system
comes up right away.  If not, an automatic filesystem recovery
is performed.  The shutdown program (on the VAX) and "init"
(on our PDP-11's) create "/down" just before the final sync()
if and only if it could kill everything off (and hence the shutdown
was "clean").

This system has worked very well for us.

--John Bruner
  Purdue/EE



More information about the Comp.bugs.4bsd.ucb-fixes mailing list