site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hi, Here is my code that registers for the notification. I do get kIOMessageCanSystemSleep when the system is put to sleep. Would user land app get kIOMessageSystemWillRestart messages? Thanks, _______________________________________________ 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... I need to find out if my daemon was launched after a restart or during the normal install. Basically I need to now if a machine was restarted. I thought IORegisterForSystemPower would do this but I do not get the kIOMessageSystemWillRestart message. gRootPort=IORegisterForSystemPower (0,¬ify,SystemPowerChangedCallback,&anIterator); if (gRootPort) CFRunLoopAddSource(CFRunLoopGetCurrent (),IONotificationPortGetRunLoopSource(notify),kCFRunLoopDefaultMode); Martin _______________________________________________________ Martin Bestmann Pole Position Software GmbH Phone: +49-9134-9942-0 Weingasse 26 Fax: +49-9134-997911 91077 Neunkirchen am Brand e-mail: martin@poleposition-sw.com Germany Web: http://www.poleposition-sw.com This email sent to site_archiver@lists.apple.com