From 1d19fc62e9034cc5700c0903f68787a84f485315 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 15 Jun 2005 02:31:38 +0000 Subject: 2005-06-14 David Zeuthen * 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 --- bus/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bus/main.c') 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)); -- cgit