Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KUNCUserNotifications, just a configd crasher?



On Monday, December 2, 2002, at 05:17 AM, Stiphane Sudre wrote:
On samedi, nov 30, 2002, at 03:09 Europe/Paris, Allan Nathanson wrote:

Please file a bug report on this.

Ok, but is it possible to know when we can use the KUNC stuff and not?

OK, but you asked for it.... ;-)

You should never use the KUNC notification stuff. There is almost always a better way to get information out of your KEXT. And if not, maybe it shouldn't have been [just] a KEXT in the first place.

Why do I say this? Because there are too many situations where the "push" model doesn't work for KEXTs. There's the "early in boot" situations, where there is no catcher for such a pushed notification. There are the "unattended operation" situations that appear all the time in servers. There is the "no logged in user" (and no way to find out when someone does log in from within a KEXT) situation. What if there is a logged in GUI user, but the event that provoked the notification was triggered by an remote user (ssh, telnet, etc...)? How do you get the notification to the right user? What if someone wants to write an auto-responding script? Responses to these types of notifications are not scriptable.

Because of all of these (and many more) issues, we only begrudging added that facility. And ever since, we been fighting the good fight to get people to not use it. KEXTs should be largely passive. They should feed their responses directly back to their client processes. If yours is not, or there are events that it handles not associated with any specific client process, it should probably be a combination of a helper daemon and a KEXT.

The KEXT system is undergoing changes to make setting up these helpers easier. There are ways to register various helpers with KEXTs (daemon-scoped ones, per-GUI-user ones, etc...). Someone from the IOKit team can explain these better. But besides serving other purposes, these allow what otherwise would be notifications pushed directly from the KEXT, be driver/family-specific events handled by the various helpers.

--Jim
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: KUNCUserNotifications, just a configd crasher? (From: Stéphane Sudre <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.