Important: The information in this document is obsolete and should not be used for new development.
The Shutdown Process
When a user chooses Shut Down or Restart from the Finder's Special menu, the tasks performed to shut down or restart a Macintosh computer differ in one important respect from those performed when you call the Shutdown Manager directly. In the former case, the Finder receives notification of a Shutdown or Restart event and calls the Process Manager to notify any open applications to quit. Only after the applications return does the Finder call the appropriate Shutdown Manager procedures to shut down or restart the system. To have your driver or application initiate this process, you can send a Shutdown or Restart event to the Finder, as described in "Sending a Shutdown or Restart Event" on page 8-7.The Shutdown Manager procedures for shutting down or restarting the system (either
ShutDwnPower
orShutDwnStart
) perform an identical five-step process:
This section describes the shutdown process in detail, beginning with the preliminary step, mediated by the Finder, of closing applications.
- Checking for and executing custom shutdown procedures installed by calls to
ShutDwnInstall
. (This step occurs three times during the shutdown process.)- Checking the Device Manager's unit table to determine whether any drivers or desk accessories are open and, if so, notifying them of the impending shutdown or restart.
- Saving the desk scrap, if any.
- Unmounting mounted volumes.
- Turning off the computer.
Subtopics
- Closing Open Applications
- Checking for Custom Shutdown Procedures
- Checking for Open Device Drivers
- Saving the Desk Scrap
- Unmounting Volumes
- Turning Off the Computer