site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Jens Alfke <jens@mooseyard.com> wrote:
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.
Depending on the meaning of "real", I guess. It's a real user account, but as you say, not a session that has access to the window server. I've written a couple in the last two years. One, a Web server, runs from a LaunchDaemon plist file; another, which has to call OpenOffice to convert documents, needed to run in a context which has access to the window server because OpenOffice needs to talk to the window server for some reason, so it runs as the logged-in user, from a LaunchAgent plist.
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)?
I'm guessing that Cocoa "Distributed Objects" might work for communication with a launchd daemon, so long as that daemon was written in Objective-C. It's part of the Foundation framework, and TN 2083 says, "The basic rule is that everything in CoreServices and below (including System, IOKit, System Configuration, Foundation) should work in any bootstrap namespace (these are daemon-safe frameworks)" Bill _______________________________________________ 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)
-
Bill Janssen