• 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: Kext Load on demand and daemon communication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Kext Load on demand and daemon communication


  • Subject: Re: Kext Load on demand and daemon communication
  • From: Shaun Wexler <email@hidden>
  • Date: Tue, 16 Oct 2007 11:05:39 -0700

On Oct 16, 2007, at 10:53 AM, Eric Long wrote:

I am looking to understand how load-on-demand drivers interact with daemons.
I'm not an experienced driver writer, so I apologize in advance for missing
the obvious. (-:


I have a driver that sends messages to a daemon that is always running. The
daemon has other purposes besides responding to messages from this kext.


In order to listen to messages from the kext, the daemon creates a
notification port, connects to the kext, and waits for available data.

Since the daemon must connect to the kext to listen for messages from it,
the kext must be loaded, so it seems there is no load on demand benefit, it
just stays loaded.


This seems like a Catch-22 to me. I don't want the kext to load unless the
OS determines that it is needed, but if it is loaded, I need my daemon to
listen to it. I can't listen to it without loading it. Can I listen for
its loading, then listen for messages?


What's the secret to making this work?

When IOKit matches your device, your kext may call KUNCExecute() to launch the daemon if it's not already running. NOTE: KUNC is unsupported but available. Otherwise the daemon must remain running, to listen for service matching notifications, and unfortunately launchd does not provide this much-needed feature.
--
Shaun Wexler
MacFOH
http://www.macfoh.com


"No problem is so formidable that you can't walk away from it." - Charles Schulz


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Kext Load on demand and daemon communication
      • From: Eric Long <email@hidden>
References: 
 >Kext Load on demand and daemon communication (From: Eric Long <email@hidden>)

  • Prev by Date: Kext Load on demand and daemon communication
  • Next by Date: Launchd API documentation
  • Previous by thread: Kext Load on demand and daemon communication
  • Next by thread: Re: Kext Load on demand and daemon communication
  • Index(es):
    • Date
    • Thread