Am 06.10.2005 um 09:53 schrieb Roman Belenov:
Richard Frith-Macdonald <[EMAIL PROTECTED]> writes:
When the session manage wishes to shut down (either for a logout
or for the
machine shutting down), it should post an
NSWorkspaceWillPowerOffNotification to the workspace
notificationCenter.
The workspace notification center sends that notification to all the
applications in the session, and they can respond by closing down
cleanly.
Is there a fallback for applications that don't explicitly observe
this
notification (like passing terminate: to NSApplication instance) ?
Since about any Mac OS X app bases on NSApplication and NSApplication
handles this, there's no need for a fallback mechanism. Apps/commands
without GUI are handled by their surrounding GUI-App (e.g.
Terminal.app) or get killed after the WindowServer quitted and the
standard-Unix-shutdown procedure takes over.
Am 06.10.2005 um 15:44 schrieb Richard Frith-Macdonald:
I think we can safely infer that the session manager *should* send
the NSWorkspaceWillPowerOffNotification to all apps on session
termination, but we don't know what (if anything) it should do then
Wait for the app to terminate?
In Mac OS X (Dock has the role of the session manager, right?), if an
app doesn't terminate for longer than about 30 seconds, the logout/
shutdown process is cancled. A Dialog asks you to try again later.
There are quite legal situations where apps don't terminate: they
popped up a "Save Changes?"-type dialog and the user didn't respond
yet. They even introduced the NSApplicationShouldTerminate
notification which can return with the answer "No".
(other than some sort of force quit of applications still running
after some interval)
If an app really hangs, you have to force quit it before you can try
shutting down again.
Alternatively, you can go to the command line and start an Unix-like
shutdown ("shutdown -r now"), bypassing all the GUI stuff. Even GUI
apps get signalled, then; but typical Cocoa apps don't use signal
handlers; they just die in this case.
Cheers,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep