Re: Daemon Communication
Re: Daemon Communication
- Subject: Re: Daemon Communication
- From: Bill Janssen <email@hidden>
- Date: Thu, 24 Jun 2010 18:50:43 PDT
- Comments: In-reply-to Jens Alfke <email@hidden> message dated "Thu, 24 Jun 2010 08:23:45 -0700."
Jens Alfke <email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden