site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jun 24, 2010, at 5:37 AM, Paolo Ambrosio wrote:
Hello,
I am in the process of starting the development of a daemon that should interact with local CLI and GUI clients (for service control and data query). It should be similar to what Spotlight does, with the daemon running at system startup, a command line client as "mdfind", a menubar item, etc.
You should watch the Launch-on-Demand WWDC10 session. It (and the rest of the WWDC10 sessions) is available to anyone with a developer account.
In the "Daemons and Agents" Technical Note TN2083 [1], "Apple recommends that you use UNIX domain sockets for client/daemon communication". Does Spotlight use this method?
No.
Being new to the Darwin/Apple world, I have another question also. In the Daemon-Safe Frameworks Table i read that Carbon and Cocoa are not available for use in daemon code, and it makes sense. Does it mean that I won't be able to vend an object using Distributed Objects (without an agent wrapping Cocoa messages to the Unix Socket)?
The example that came with the Launch-on-Demand session serializes a CFPropertyList and sends it over a Unix domain socket. That's what I'd recommend you do. The reason Carbon and Cocoa aren't considered daemon-safe is because they may attempt to access user-specific resources (like the home directory). While daemons run with root privileges, they do not run "as root". They are fundamentally user-free constructs. -- Damien Sorresso BSD Engineering Apple Inc. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Damien Sorresso