Important: The information in this document is obsolete and should not be used for new development.
ExitToShell
CallExitToShell
to terminate your application directly.
PROCEDURE ExitToShell;DESCRIPTION
TheExitToShell
procedure terminates the calling process. The Process Manager removes your application from the list of open processes and performs any other necessary cleanup operations. In particular, all memory in your application partition and any temporary memory still allocated to your application is released. If necessary, the Application Died Apple event is sent to the process that launched your application.If your application was the foreground process at the time it called
ExitToShell
, its name is removed from the Application menu. The Process Manager selects a new foreground process, switches it into the foreground, and propagates the scrap to the new foreground application.If your application was the last one running and the shell program is not the Finder, the Process Manager displays a dialog box that gives the user the choice of restarting the computer or shutting it down.
SPECIAL CONSIDERATIONS
Any trap patches installed by your application are removed immediately byExitToShell
. They will not affect any trap calls made byExitToShell
itself.RESULT CODES
WhenExitToShell
exits, the system global variableDSErrCode
holds its result code.SEE ALSO
See "Terminating an Application" on page 2-11 for details on the parameters passed to the Application Died event.