Important: The information in this document is obsolete and should not be used for new development.
Checking for Custom Shutdown Procedures
After all open applications have quit, the Finder calls eitherShutDwnPower
orShutDwnStart
, respectively, depending on whether the user chose Shut Down or Restart from the Finder's Special menu. Because these two procedures perform the same set of tasks, the ensuing explanation applies to both routines.The
ShutDwnPower
routine first checks for custom shutdown procedures installed by calls toShutDwnInstall
. The Shutdown Manager maintains a queue that contains the address of each custom procedure and a constant indicating when during the shutdown process to execute each procedure. TheShutDwnPower
routine reads this queue three times during the shutdown process: before notifying drivers to shut down, before unmounting volumes, and before turning off the power. (See the description ofShutDwnInstall
on page 8-13 for an explanation of the shutdown constants.) At this point,ShutDwnPower
executes any custom procedures that specify thesdOnDrivers
constant. Then it begins the next step of the shutdown process: checking for open device drivers.