summaryrefslogtreecommitdiffstats
path: root/bus/main.c
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2005-06-15 02:31:38 +0000
committerDavid Zeuthen <davidz@redhat.com>2005-06-15 02:31:38 +0000
commit1d19fc62e9034cc5700c0903f68787a84f485315 (patch)
tree6d0da2b8c889fefa111cc695b42d4b83e97ff237 /bus/main.c
parent50f85baa3d92657a6c77c450a8f6dc34206e0610 (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/main.c')
-rw-r--r--bus/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bus/main.c b/bus/main.c
index f4b188a9..be3fe319 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -44,6 +44,10 @@ signal_handler (int sig)
switch (sig)
{
+#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
+ case SIGIO:
+ /* explicit fall-through */
+#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
case SIGHUP:
_dbus_string_init_const (&str, "foo");
if (!_dbus_write (reload_pipe[RELOAD_WRITE_END], &str, 0, 1))
@@ -397,9 +401,12 @@ main (int argc, char **argv)
}
setup_reload_pipe (bus_context_get_loop (context));
-
+
_dbus_set_signal_handler (SIGHUP, signal_handler);
_dbus_set_signal_handler (SIGTERM, signal_handler);
+#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
+ _dbus_set_signal_handler (SIGIO, signal_handler);
+#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
_dbus_verbose ("We are on D-Bus...\n");
_dbus_loop_run (bus_context_get_loop (context));