Re: Detect new available names in bus

Ralf Habacker <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
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
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.