site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=mooseyard.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s= mooseyard.com; bh=AVlfVMzIhVxKxxffhmSwQZMrPqA=; b=KF8Zr2iAkj0pwA 2BjL+8VuJotV7btsoJlsghsVFiuQwUMy0cwGn1NJcsmj7EvNZWiat1YwYMmy82ay F7dLVUx7qdPmrE4hq6xj0vUkWlZFaIM+/QYiwoLOrZkY/J2wpGuQbCXEXCdRMYHk 4KlQiwCciuSvvhYbcuw0fdx9Kr4Kk= Domainkey-signature: a=rsa-sha1; c=nofws; d=mooseyard.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= mooseyard.com; b=nKuXmYsfwVr5OKQX93EEf4YCQj8YHcWgrEe70I4ASX0LWUg hFPOzWq2YcaTTLh42De3bWcrqPyeFaT8pjgTHgXeEd5zTgjL/BqmbOkjlU7tp3SY 27RBcaqtcGgbkT/lRGpUYRlv3N7S++dji+wkZ1sMfB3rYXqjV7gNzLzbVtWM= On Jun 24, 2010, at 5:37 AM, Paolo Ambrosio wrote:
I am in the process of starting the development of a daemon that should interact with local CLI and GUI clients
Are you sure you really need a daemon and not an agent? Daemons are harder to write since they don’t run as a “real” user or within a regular login session. Moreover, if you run a daemon as root, you have to be very careful about security.
"Apple recommends that you use UNIX domain sockets for client/daemon communication". Does Spotlight use this method?
A lot of Apple stuff uses Mach messages, with MIG as the RPC mechanism. I think this is not recommended for 3rd party developers because there isn’t good documentation for it (for some reason Apple has never released real docs for Mach-level stuff, so you often have to dig up old NeXT docs or even stuff from the CMU Mach project.)
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)?
“Cocoa” is a marketing term, not a real framework :) Or rather, it’s used as an aggregate term for Foundation + AppKit. AppKit definitely shouldn’t be used in a daemon or agent. Foundation is safe for agents, and I would guess that subsets of Foundation are safe for daemons — the core Obj-C stuff should be OK, but I have no idea what things like NSUserDefaults will do if they’re not running as a regular GUI account with a Library/ subdirectory. —Jens _______________________________________________ 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)
-
Jens Alfke