• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWorkspaceWillPowerOffNotification from a daemon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWorkspaceWillPowerOffNotification from a daemon


  • Subject: Re: NSWorkspaceWillPowerOffNotification from a daemon
  • From: Dave Keck <email@hidden>
  • Date: Thu, 12 Mar 2009 16:12:23 -1000

It seems your situation is similar to this:

http://lists.apple.com/archives/macnetworkprog/2007/Aug/msg00017.html

I just tested, and a normal (non-daemon) Cocoa app _does_ receive the
power-off event. It sounds like daemons in particular have an issue
receiving it.

It appears that IOKit has something called
"kIOMessageSystemWillPowerOff". Check out
/Developer/Examples/IOKit/FireWire/FWLib. You'll probably need to
change the project to write the output to a file, or something. Once
you've done that, shut down your computer. When you reboot, whatever
log file was created should mention something about
kIOMessageSystemWillPowerOff.

How does this suite your needs? It's definitely not as elegant as
NSNotifications, but it's probably more robust.

David
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSWorkspaceWillPowerOffNotification from a daemon (From: Matthew Mashyna <email@hidden>)

  • Prev by Date: UIPickerView Caching Items
  • Next by Date: Re: Getting the front process path
  • Previous by thread: Re: NSWorkspaceWillPowerOffNotification from a daemon
  • Next by thread: TXT Records with NSImages
  • Index(es):
    • Date
    • Thread