Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes
Chapter 8 - Shutdown Manager / The Shutdown Process


Checking for Custom Shutdown Procedures

After all open applications have quit, the Finder calls either ShutDwnPower or 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.

The ShutDwnPower routine 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 ShutDwnPower 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 of ShutDwnInstall on page 8-13 for an explanation of the shutdown constants.) At this point, ShutDwnPower executes any custom procedures that specify the sdOnDrivers constant. Then it begins the next step of the shutdown process: checking for open device drivers.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996