Andrew Gallatin writes:
>
> Andrew Gallatin writes:
> >
> > Godfrey van der Linden writes:
> > >
> > > Also check out the machinit functionality of launchd in Tiger. This
> > > will allow you to setup a launch on demand daemon that will start
> > > running when you send a mach_message to a 'known' port. I thing the
> > > machinit code went in in the 10.2 timeframe but I'm not sure of the
> > > details.
Are you talking about the stuff in /etc/mach_init.d? In case you were,
I started to look at that, but I'm really not mach literate. The
conclusion I drew was that I'd be re-implementing most of of the kunc
system, and that I'd be better off using KUNCExecute() as-is.
> I have an idea:
>
> I use devfs to dynamically create character devices nodes when my
> driver is loaded. So I think I can probably use the WatchPaths
> directive to watch for my character device nodes appearing. It will
> require a wrapper shell script.... Hmm..
I was wrong. It doesn't work the way I'd like. If I use the
WatchPaths key, with /dev/mx0 (my device node), then the launch item
does not run when my device is loaded and /dev/mx0 appears. This is
because launchd can't open /dev/mx0 to install an event filter on it
when it does not exist.
So, my next guess was to try QueueDirectories on /dev. This works
way too well, and my program is restarted almost constantly. So I
think this is out too..
So unless there's some way for my driver to signal launchd, I guess
I'm stuck with KUNCExecute. Which is a shame, because its my
dependancy on com.apple.kernel in this driver.
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden
This email sent to email@hidden