For everything else other than Cocoa and Carbon applications that receive AppleEvents, when the computer is shutdown, everything else is sent a SIGKILL by launchd, just like any other Unix system (launchd takes the place of the init daemon seen on other Unix systems). Semantics for BSD signals are described in the man pages (kill, signal, etc.). SIGINT is like hitting Ctrl-C at the terminal to stop a shell process. Processes can ignore a Ctrl-C. SIGKILL is non- ignorable.

How much of the process is a controlled shutdown is another matter :)!

Jonathan

On Dec 16, 2008, at 9:48 PM, Andrew Farmer wrote:

On 16 Dec 08, at 18:40, Chris Idou wrote:
Ok. BTW, what happens exactly when you try and shut down a Mac? On a UNIX system all the processes are sent SIGINT or something, at which point they should enter a controlled shutdown procedure.

The OS X desktop uses Apple Events to send shutdown requests to applications - unlike signals, these can be responded to in-band. In a Cocoa application, this shows up as an applicationShouldTerminate: message to the NSApplication delegate.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jprescott12%40comcast.net

This email sent to jprescot...@comcast.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to