site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Dec 12, 2006, at 3:42 PM, Sean McBride wrote: Hi all, QA1340 "Registering and unregistering for sleep notifications" is just what I was looking for. <http://developer.apple.com/qa/qa2004/qa1340.html> I copy and pasted the code from 'listing 1' and put it in a brand new Xcode 'CoreFoundation tool' project. But the callback function specified to IORegisterForSystemPower() is never called! I've put a breakpoint, printf, and assert(0). Thanks, Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFfyoqedHYW7bHtqIRAjLlAJ91l7GZbwh2IpTvyYDxjtrCOP6srQCfVi6q 4Sf+5PuekM7eVSOCpiUXMjs= =ZRxL -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... The callback requires a run loop. Have you created one, added the callback source port and started the loop running? Is anyone using this code? I've tried in 10.3.9, 10.4.8, and 9a303 and it just doesn't seem to work at all. (PS: yes, I have a good reason to deny sleep: firmware update over RS-232.) This email sent to site_archiver@lists.apple.com