diff options
author | David Zeuthen <davidz@redhat.com> | 2005-06-15 02:31:38 +0000 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2005-06-15 02:31:38 +0000 |
commit | 1d19fc62e9034cc5700c0903f68787a84f485315 (patch) | |
tree | 6d0da2b8c889fefa111cc695b42d4b83e97ff237 /bus/bus.c | |
parent | 50f85baa3d92657a6c77c450a8f6dc34206e0610 (diff) |
2005-06-14 David Zeuthen <davidz@redhat.com>
* bus/bus.c (process_config_every_time): Drop existing conf-dir
watches (if applicable) and add new watches
* bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
(main): Setup SIGIO signal handler if using D_NOTIFY
* bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
* bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
(merge_included): Also merge conf_dirs list
(bus_config_parser_unref): Clear conf_dirs list
(include_dir): Add directory to conf_dirs list
(bus_config_parser_get_conf_dirs): New function
* bus/dir-watch.[ch]: New files
* bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
* configure.in: Add checks for D_NOTIFY on Linux
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -30,6 +30,7 @@ #include "config-parser.h" #include "signals.h" #include "selinux.h" +#include "dir-watch.h" #include <dbus/dbus-list.h> #include <dbus/dbus-hash.h> #include <dbus/dbus-internals.h> @@ -478,6 +479,15 @@ process_config_every_time (BusContext *context, goto failed; } + /* Drop existing conf-dir watches (if applicable) and watch all conf directories */ + + if (is_reload) + bus_drop_all_directory_watches (); + + _dbus_list_foreach (bus_config_parser_get_conf_dirs (parser), + (DBusForeachFunction) bus_watch_directory, + NULL); + _DBUS_ASSERT_ERROR_IS_CLEAR (error); retval = TRUE; @@ -720,6 +730,7 @@ bus_context_new (const DBusString *config_file, _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; } + if (parser != NULL) bus_config_parser_unref (parser); |