[patch] automatically reload config

David Zeuthen david at fubar.dk
Tue Jun 14 19:36:03 PDT 2005


On Tue, 2005-06-14 at 22:11 -0400, Colin Walters wrote:
> On Tue, 2005-06-14 at 21:13 -0400, David Zeuthen wrote:
> > On Tue, 2005-06-14 at 18:03 -0400, Colin Walters wrote:
> > > About the patch; I'm a bit confused why bus_config_load and takes a
> > > watch_config_directories argument.  Why not just default it to TRUE
> > > inside bus_config_parser_new?
> > 
> > Yeah, the thinking was to not use this for tests.
> 
> Ah; perhaps you could disable the watching inside the test conf files.
> It shouldn't be a big deal though; I don't think anything changes the
> test/data/valid-conf-files dir during build.

Yeah, I thought that too. We could add an option <watch_include_dirs>
but I can't figure out why one wouldn't use it (and in fact just having
<includedir> is a bit over the top already). So I kind of punted this.

> > > It also seems a bit evil to start watching the directory in the config
> > > parser itself; should probably maintain a list of directories and then 
> > > process_config_every_time does both the drop of watched dirs and the
> > > invocation of bus_config_watch_directory, retrieving the list via a new
> > > function, bus_config_parser_get_watched_dirs.
> > 
> > That sounds much smarter. The attached patch should do this.
> 
> Is there a reason you don't do the bus_watch_directory inside
> process_config_every_time?  That function is called by both
> bus_context_new and bus_context_reload_config, and is intended to
> contain everything that should run during context construction and
> configuration reload.
> 
> Other than that minor bit, it looks good to me.
> 

I've committed the patch with this minor change. Thanks for the review.

    David




More information about the dbus mailing list