Revision [99]

This is an old revision of ioExit made by JohnMcIntosh on 2008-10-14 21:57:28.

 

sqInt ioExit(void)

Parms: NONE
return: NONE, fake return of zero
From: Interpreter
Why:
image read failure, or primitiveQuit or some other quit action via platform code.
Responsibility:
Terminate running application on quit.
calls ioShutdownModules to shutdown plugins
calls exit(0) on unix machines
control might not return to caller, see man exit(0)
The debate is does the application actually need to do anything other than exit? However historically this API was written when applications had to share resources and at quit time had to do cleanup chores.

MacIntosh
Called by ioProcessEvents if gQuitNowRightNow which can be triggered by a macintosh menu, or system shutdown if the info.plist setting for SqueakQuitOnQuitAppleEvent=YES, or at startup time if the user choosed to cancel the select an image to use dialog, or if running as a headless application for the browser we determine the browser parent process has quit.
os-9/OSXCarbon
Restore menu bar if non-headless or running browser in full screen.
Unload clipboard scrap (no-op on OSX)
free image memory allocation
calls ExitToShell versus exit(0)
Cocoa:
TBD

iPhone
Unix
Windows
{much more work to cleanup environment) calls printCallStack if this is not a clean quit, clean up if a browser plugin, deal with sytemtray, close stderr/stdout, release virtual memory, deal OLE cleanup.

BUGS
Sometimes plugin cleanup work causes the VM to crash because of poorly written plugin termination code.
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki