On 22/11/2011, at 13:00, launchd-dev-request@lists.macosforge.org wrote:
Date: Tue, 22 Nov 2011 10:02:56 +0000 From: "Quinn \"The Eskimo!\"" <eskimo1@apple.com> Message-ID: <86B0B3BF-8627-40C7-9B29-24A38F3608E8@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@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
On 22 Nov 2011, at 15:56, Rainer Brockerhoff wrote:
but it would be helpful if you, in that explanation, could mention what the easiest (or more reliable?) API for doing so on Lion
XPC. You're already using it to talk to your XPC service, so you know the API already, and it's the best, most forward-looking IPC API we have. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
On Nov 22, 2011, at 7:56 AM, Rainer Brockerhoff wrote:
On 22/11/2011, at 13:00, launchd-dev-request@lists.macosforge.org wrote:
Date: Tue, 22 Nov 2011 10:02:56 +0000 From: "Quinn \"The Eskimo!\"" <eskimo1@apple.com> Message-ID: <86B0B3BF-8627-40C7-9B29-24A38F3608E8@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.
Rainer, Check out the XPC man pages for more complete documentation about how to use XPC to talk to MachServices. Specifically, xpc_connection_create_mach_service(3). The man pages shipped with Xcode 4.2. There is also extensive HeaderDoc in /usr/include/xpc. -- Damien Sorresso dsorresso@apple.com
participants (3)
-
Damien Sorresso
-
Quinn "The Eskimo!"
-
Rainer Brockerhoff