Detect new available names in bus

Ralf Habacker ralf.habacker at freenet.de
Tue Feb 15 09:44:56 UTC 2022


Am 15.02.22 um 01:05 schrieb Thiago Macieira:
> On Monday, 14 February 2022 16:01:39 PST Sergio Costas wrote:
>> Anyway, if I write a patch for the daemon that implements checking
>> $XDG_DATA_DIRS/dbus-1/ folders and notify new/removed services, do you
>> think that there is a possibility of it being accepted, or it would be a
>> "definitely NO"? (just to avoid doing it if it will be rejected for sure).
> 
> It's not a simple patch because you're modifying the org.freedesktop.DBus
> interface. That requires an update to the D-Bus specification, I think.
> 

If dbus is build with inotify support on Linux, it will watch 
directories specified as service directory (see 
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/dir-watch-inotify.c).

If files are changed, a SIGHUP signal is send to the dbus server process 
(https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/dir-watch-inotify.c:74), 
which reloads configuration files (see 
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/doc/dbus-daemon.1.xml.in#L73)

Ralf


More information about the dbus mailing list