The Shutdown Manager gives applications and other software a chance to perform any necessary processing before the computer is turned off or restarted.
Inside Macintosh: Processes (Chapter 8 - Shutdown Manager) This document describes the parts of the Macintosh system software that allow you to manage processes and tasks. Chapter 8 describes how to use the Shutdown Manager and includes an overview, a tutorial, and a complete API reference.