Bug? org.freedesktop.DBus no longer has unique name :1.0

John (J5) Palmieri johnp at redhat.com
Fri Oct 12 09:46:01 PDT 2007

On Fri, 2007-10-12 at 12:23 -0400, Havoc Pennington wrote:
> Hi,
> John (J5) Palmieri wrote:
> > So fixing GetConnectionUnixProcessID (and checking other methods that
> > take a connection name) would be the correct thing to do.  We should
> > also mention this in the spec I am guessing.
> > 
> Yes. Though I think GetConnectionUnixProcessID should just return an 
> error for this, just as it would for a TCP connection or other 
> connection with unknown PID. It could return the PID of the bus, but 
> that is probably pointless - dbus_connection_get_unix_process_id() is a 
> better way to get that, avoiding a round trip. And any reason I can 
> think of to know the remote pid probably would not want to include the 
> bus daemon. Another way to think of it is that 
> GetConnectionUnixProcessID could be defined to get the PID of a process 
> connected to the bus daemon (and the bus daemon is not connected to itself).

That sounds fine to me.  I'll special case it.  The reason I want it is
I am writing a dev console for D-Bus and knowing the PIDs of everything
connected to the bus is helpful when debugging what is going on and who
is sending what.  Basically I get the pid and on Linux convert that to a
process name by looking in /proc (not sure if this works in other
Unixes).  The idea is to be able to recreate the conditions of a bug so
if your app was activated with certain switches you would see this and
be able to start it in gdb or other debuggers.  If we get an error while
looking for the PID I just display 'Unknown or Remote'.

John (J5) Palmieri <johnp at redhat.com>

More information about the dbus mailing list