[launchd-dev] OnDemand USB Software
Quinn
eskimo1 at apple.com
Tue Mar 18 03:09:06 PDT 2008
At 23:23 +0100 17/3/08, Mike Fischer wrote:
>So far, looking at tn2083 and the man pages, I don't see any way to
>have a depency on USB or IOKit in general. Am I missing something
>here?
No, you're not missing something. This is a much-requested feature
that we're tracking as <rdar://problem/4551362>.
>If there is no direct support would it make sense to have a very
>small, lightweight daemon always running that registers for IOKit
>IOServiceAddMatchingNotification notifications and creates a
>semaphore file that can be used to trigger the launch of the real
>daemon for example?
That's a fine way to do it. I probably wouldn't use a semaphore
file, because it persists in the file system. However, there are
numerous other options available to you. If I was doing this, I'd
probably have your main daemon register a UNIX domain socket and have
your lightweight daemon connect to that socket to trigger a launch.
>BTW: This would be mainly for Leopard, although Tiger would be
>interesting too.
This approach would work just fine on 10.4.x (x >= 6 if you use UNIX
domain sockets).
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
More information about the launchd-dev
mailing list