Important: The information in this document is obsolete and should not be used for new development.
Checking for Custom Shutdown ProceduresAfter all open applications have quit, the Finder calls either
ShutDwnStart, 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.
ShutDwnPowerroutine first checks for custom shutdown procedures installed by calls to
ShutDwnInstall. 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. The
ShutDwnPowerroutine 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 of
ShutDwnInstallon page 8-13 for an explanation of the shutdown constants.) At this point,
ShutDwnPowerexecutes any custom procedures that specify the
sdOnDriversconstant. Then it begins the next step of the shutdown process: checking for open device drivers.