• 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: launchd APIs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launchd APIs


  • Subject: Re: launchd APIs
  • From: Shaun Wexler <email@hidden>
  • Date: Tue, 25 Apr 2006 12:50:16 -0700

On Apr 25, 2006, at 8:10 AM, Dave Zarzycki wrote:

No, and that is a feature in fact. :-)

launchd is a completely different bootstrapping philosophy.

Under launchd, dependancies are expected to be expressed via APIs, and those APIs may (or most likely) will use IPC to determine when goals have been satisfied.

The nice thing about APIs is that it encourages daemon writers to register callbacks for when their requirements are satisfied, which could be 30 seconds from now, or 30 days from now, it doesn't matter. But at least the daemon can make forward progress with other goals in the interim.

In your case, it sounds like you need to use the available kext management APIs to determine when your driver has been loaded.

I hope all this makes sense.

I have a similar situation. My kext gets cached, but internally waits for certain services to become available, then it publishes itself. launchd starts my daemon early, usually with pid 31 or 32, and during its init it registers for service notifications for the kext, and once it receives the callback (or upon first enum), it connects. I was getting panics often, random but on/near this time, so as a temp workaroundl I added a sleep timeout in the daemon of 10 seconds before it added its notifier. Still no idea why. Loading/ unloading the kext later works perfectly, and so does starting the daemon later, but not both of them asap. Strange.
--
Shaun Wexler
MacFOH
http://www.macfoh.com


"Never trust a computer you can't throw out a window." - Steve Wozniak


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >launchd APIs (From: Kevin Brock <email@hidden>)
 >Re: launchd APIs (From: Dave Zarzycki <email@hidden>)
 >Re: launchd APIs (From: Kevin Brock <email@hidden>)
 >Re: launchd APIs (From: Dave Zarzycki <email@hidden>)

  • Prev by Date: Re: launchd APIs
  • Next by Date: Re: Launchd and domain sockets, accept() problem (was Re: launchd APIs)
  • Previous by thread: Re: launchd APIs
  • Next by thread: Launchd and domain sockets, accept() problem (was Re: launchd APIs)
  • Index(es):
    • Date
    • Thread