Subject: The right place for doshutdownhooks()
To: None <tech-kern@NetBSD.ORG>
From: Greg Hudson <ghudson@MIT.EDU>
List: tech-kern
Date: 11/19/1995 20:44:44
So, after it was expressed that doshutdownhooks() was allegedly in the
wrong place in arch/i386/machdep.c, I took a look at the code I
checked in.  Currently, in the i386 port doshutdownhooks() is run
after the key is pressed for "press any key to reboot" (if it's a
halt), and after a dump (if any).  In the alpha port,
doshutdownhooks() is run after a dump (if any) but before a key is
pressed for "press any key to reboot".

I discussed this with mycroft, and I think the i386 port actually has
the right idea:

	* In all cases, the shutdown handlers will actually get run,
	  unless the machine's power is reset, in which case you don't
	  care.

	* The shutdown handlers might actually shut down the console
	  driver in some circumstances, rendering it impossible for
	  the user to press a key.

Disagreements?  Thoughts?