[launchd-dev] The MachService key

Quinn "The Eskimo!" eskimo1 at apple.com
Tue Nov 22 02:02:56 PST 2011


On 22 Nov 2011, at 01:28, Jerry Krinock wrote:

> Does anyone know a book or other resource where I could learn about Mach services?

Prior to the introduction of XPC in Mac OS X 10.7, registering a Mach service required that you do your IPC using Mach messaging.  Mach messaging is /extremely/ tricky to get right, and I highly recommend that you avoid it.

XPC makes this much easier.  Much of the focus of XPC is in providing XPC services, that is, small chunks of code that you include in an app that you can talk to from the app.  This makes certain security tasks (sandboxing, privilege separation) much easier.  However, it's also possible to use XPC to talk to a launchd daemon.

With the above in mind, is taking a dependency on 10.7 feasible or not?  If it is, I can explain how you can use XPC to talk to a launchd daemon via the MachServices key.

Share and Enjoy 
--
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