Re: How does dbus-daemon handle multiple services with same Name?

"Armin K." <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
On 06/21/2015 08:42 PM, Lennart Poettering wrote:
> On Sun, 21.06.15 13:02, Armin K. ([email protected]) wrote:
> 
>> Hi,
>>
>> While trying kdbus with systemd, I have ran across a problem.
>> Apparently it doesn't yet properly handle multiple D-Bus services
>> with same name.
>>
>> I'm interested in how does D-Bus daemon handle this? Which one
>> gets loaded and how it decides which one to load?
>>
>> An example:
>>
>> I have two services with Name=org.freedesktop.FileManager1
>>
>> One is GNOME's Nautilus, other is MATE's Caja File Manager.
>> Which one would get loaded and why?
> 
> Only one service can own a name at a time. If one already owns a name,
> and another one tries to take possession of it as well, then one of
> three things can happen:
> 
>       a) the request to own the name is queued, and dbus-daemon passes
>       it on automatically and atomically as soon as the old owner
>       voluntarily gives it up.
> 
>       b) the operation to request the name will simply fail (this mode
>       of operation you get by passing DBUS_NAME_FLAG_DO_NOT_QUEUE when
>       acquiring the name)
> 
>       c) the name will be taken away forcible from the old owner (only
>       if the new owner indicated DBUS_NAME_FLAG_REPLACE_EXISTING, and
>       the old one DBUS_NAME_FLAG_ALLOW_REPLACEMENT).
> 
> Either way, and no times there are two owners of a name at the same
> time, neither in kdbus, nor in dbus-daemon.
> 
> Lennart
> 

I'm asking specifically because current dbus-daemon seems to
kinda handle it, but kdbus will error out when it tries to
create a symlink for bus-proxyd. I was asked on systemd
bug tracker how dbus handles this, that's why I asked here.

-- 
Note: My last name is not Krejzi.

_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVhwlXAAoJEMxyaRAVyqJOd7IQAJisPXScMx8HduzHg89PCQZf
gSohqOxfZHHQk/u29PXyYy4WEYVb8zQthJe2vErP0pJ2o1mPAE81OWpxzY1i8e/x
q4pGBFPgMuSVDjG36DO8AsccxZG+ktjCxx3IqtHxAQSpQlDa90q+IS6/Tseh8mB6
U3zUQeZCFxJ4LifVWjst2o89dHdD2MJ2XBtnaioATLyRFVJTD+8ArZPwRCDf+qyI
xcOY7/MtaEeAMvrALEfbiq1Z0to0t8J9SN/zUxfDHWQadOiddAhaE9QNDGa2fZ5q
PDwdlS5XSnAXjparqwRtLF/d/6IQ53qK6S4LOP71l6rpBEPPPrPBcgNGZZ0cmxYr
7nSSl3Hlof5ptg6K3HABn5AIKOQFvqR1S918CAUrp7QMciXIVb+kd/nQAKrYZ8Nn
v6jmPASDAzW45JZBJPsjS7royqrgJclgdXxIip+yayNeu8egzyNGsmVSLLIN2P0Q
6C95chDIj2OyPM6PoX+xIm/+Fc1RvSSrQcoQ6EbQ3pXsYi35Jrd1hRo+bm93gsZV
Q38PYMCCDGkvQ+9CLQzPEOraF/sJe0GZc8pIl1abV3XKzezR4ykGIdJGhMQLS6PO
2q8p7tY9Wt18BB5ERirYLLHU6W0idG8r0LFnAM7Jyo1ei9qZDc3pUDeaZiP+GeLn
nHAfgU2Rh9b7u07KUlyJ
=MLuD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.