Re: Detect new available names in bus

Sergio Costas <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
El 15/2/22 a las 10:44, Ralf Habacker escribió:
> 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)
>
Which confirms that the dbus daemon is already monitoring those folders 
(both with inotify for linux and kqueue for BSD), so adding that dbus 
signal sould be quite straightforward...

So... How much complex is to submit a proposal for modifying the 
specification...?
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.