Re: How to tell if system shutdown is in process
Re: How to tell if system shutdown is in process
- Subject: Re: How to tell if system shutdown is in process
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Wed, 23 Mar 2011 21:11:04 +0000
On 23 Mar 2011, at 18:03, Jerry Krinock wrote:
> The suggestion there is to use NSWorkspaceWillPowerOffNotification.
NSWorkspace is not the droid you're looking for. AppKit sends it in response to a 'quit' Apple event that has the 'why?' attribute, implying that the app is being quit by loginwindow in preparation for restart or shutdown. This doesn't really help you.
When you say "started automatically by launchd", do you mean the global system launchd (that is, pid 1) or some per-user launchd? If you're started by the global launchd, you're running in a daemon context and you should not be linking with AppKit (per the rules outlined in Technote 2083 "Daemons and Agents").
<http://developer.apple.com/library/mac/#technotes/tn2005/tn2083.html>
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden