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: Brian Bergstrand <email@hidden>
- Date: Thu, 24 Mar 2011 11:44:03 -0500
On Mar 24, 2011, at 4:14 AM, Quinn The Eskimo! wrote:
>
> On 24 Mar 2011, at 04:55, Brian Bergstrand wrote:
>
>> Use IOKit, specifically, IORegisterForSystemPower(). In the callback you provide check for kIOMessageSystemWillPowerOff and kIOMessageSystemWillRestart.
>
> In general IORegisterForSystemPower is fine. However, the header docs for these two events contain the text "Never delivered to user space notification clients.", leading me to believe that they won't work for a daemon. Probably worth a try though. QA1340 has code that you can easily adapt to create a simple test program.
>
I don't see that header doc in the 10.6 SDK (checked both the defines and IORegisterForSystemPower() itself). Where are you seeing it?
_______________________________________________
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