A/UX 2.0: Toolbox Shutdown Manager Routines Correction


Using A/UX 2.0, I want to run a self-written program as a stand-alone application without the Finder. When I change the "mac32" startup script to "/mac/bin/startup -f ApplicationName &" things work fine except for the logout. Because the 'ExitToShell' procedure doesn't do a logout, I tried using the Shutdown Manager routines.

The "A/UX Toolbox: Macintosh ROM Interface" documentation mentions that the A/UX Toolbox routines 'ShutDwnPower' and 'ShutDwnStart' do an exit to the user's login shell. I've tried using both routines, but they work just like normal Macintosh Toolbox routines (in other word, they shutdown and restart the machine).


First of all, one minor correction: /mac/bin/startup SHOULD BE either /mac/bin/startmac or /mac/bin/startmac24

The "ShutDwnPower" and "ShutDwnStart" routines documented in the "A/UX Toolbox: Macintosh ROM Interface" are WRONG! The routines behave the same as Mac OS Shutdown Manager routines (shutdown and restart).

To Logout from user's login shell, use the AUXDispatch() trap with the A/UX_LOGOUT selector. All definitions for the AUXDispatch trap are specified in the header file /usr/include/mac/aux.h.

For more detailed information about AUXDispatch trap, please refer to page 3-15 on "A/UX Toolbox: Macintosh ROM Interface" documentation.
Published Date: Feb 18, 2012