[MacPorts] #17950: dbus patched with launchd support and version dump
MacPorts
noreply at macports.org
Tue Jan 20 02:21:52 PST 2009
#17950: dbus patched with launchd support and version dump
---------------------------------+------------------------------------------
Reporter: jonas.baehr@… | Owner: macports-tickets@…
Type: enhancement | Status: reopened
Priority: Normal | Milestone: Port Enhancements
Component: ports | Version: 1.7.0
Resolution: | Keywords: launchd kde4 x11
Port: dbus |
---------------------------------+------------------------------------------
Comment(by jonas.baehr@…):
Replying to [comment:49 mta@…]:
> Replying to [comment:46 jonas.baehr@…]:
> > My hotfix in [#comment:42] is also valid, since only children of
launchd can talk to launchd via IPC. That means the env var is always
present, but also that it's impossible to start dbud-daemon manually if it
should listen on a "launchd:"-address. This limitation lays in the design
of launchd and is not a problem with the patch.
>
> I don't think this is quite right. There is a tree of processes under
launchd. Any process in this tree can talk to launchd and get the value
of the environment variable using code like that in
_dbus_lookup_session_address_launchd. However the environment variable
itself is only in the environment of the dbus process and its descendants.
I don't know if this matters much, but it means that clients started by
siblings or cousins of the dbus process don't have the environment
variable giving the dbus socket in their environment.
The environment variable can be accessed by any process of your user using
the `launchctl getenv FOO` method. This is what all the clients do. The
server however needs the file descriptor of the socket so listen on, and
that one can only be accessed if it was spawned by launchd itself. Under
this condition the server has also access to the envorinment variable
directly, which he uses to pass the socket path on which we listens to
it's childs (autolaunched services)
> When I logon the dbus process gets started. If I subsequently start
(for example) a terminal process from which I start a dbus client, it
can't find the dbus started by launchd unless it uses code like that in
_dbus_lookup_session_address_launchd.
As I said, the client never did anything else then asking via launchctl. I
just recaftored the code a bit to share it between the dynamic session bus
lookup and the resolving "launch:" addresses.
--
Ticket URL: <http://trac.macports.org/ticket/17950#comment:52>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list