[launchd-dev] Launch on demand from kernel extension?

Andre-John Mas ajmas at sympatico.ca
Tue Jun 24 13:30:17 PDT 2008


On 24-Jun-08, at 13:04 , Quinn wrote:

> At 13:28 -0700 23/6/08, Colin wrote:
>> Is it possible, using launchd, to have my kernel extension launch the
>> helper daemon on demand?  If so, what is the best way to implement
>> this?  I need to support OS X 10.4.11 and above.
>
> This isn't any explicit support for this within Mac OS X.  We're
> hoping to support this more explicitly in the future, at least for
> I/O Kit KEXTs <rdar://problem/4551362> <rdar://problem/4193561>, but
> there's nothing in place right now.
>
> One option is to have your daemon start on demand based on a
> connection to UNIX domain socket and then have your KEXT connect to
> that socket when it needs service.  I've been working on a sample
> that shows this.  I'll send you a copy via personal email.

Would the mechanism be similar for stuff wanting to establish tunnels?
I ask because I had previously looked at trying to make tun/tap use
launchd or something similar, instead of a startup item, but I didn't
find anything appropriate.

Andre



More information about the launchd-dev mailing list