[launchd-dev] The MachService key

Rainer Brockerhoff rainer at brockerhoff.net
Tue Nov 22 07:56:22 PST 2011


On 22/11/2011, at 13:00, launchd-dev-request at lists.macosforge.org wrote:
> Date: Tue, 22 Nov 2011 10:02:56 +0000
> From: "Quinn \"The Eskimo!\"" <eskimo1 at apple.com>
> Message-ID: <86B0B3BF-8627-40C7-9B29-24A38F3608E8 at apple.com>
> 
> 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.


I'll have a situation - 10.7 (and successors) only - where I'd like to talk to my launchd daemon, both from an app and perhaps from an XPC service launched by that app. Messages could be either NS/CFDictionaries or a blob of binary data.

I'm not particularly set on using MachServices, or CFMessagePort, or whatever; but it would be helpful if you, in that explanation, could mention what the easiest (or more reliable?) API for doing so on Lion.

Thanks,
--
Rainer Brockerhoff  <rainer at brockerhoff.net>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/blog



More information about the launchd-dev mailing list