From 5d77d1503e61339a971b099b8a4d24ffc502045b Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 20 Dec 2006 06:18:19 +0000 Subject: 2006-12-19 Ray Strode * bus/bus.c (process_config_every_time): don't overwrite existing bus context activation object until after we've checked that the new activation is valid. * bus/main.c (signal_handler), (handle_reload_watch): don't call exit() on failure, instead make do and keep going. (close_reload_pipe): new function to turn off hangup-causes-config-reload behavior if an unexpected error occurs --- bus/bus.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'bus/bus.c') diff --git a/bus/bus.c b/bus/bus.c index 562eb983..26f91adb 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -402,6 +402,7 @@ process_config_every_time (BusContext *context, { DBusString full_address; DBusList *link; + BusActivation *new_activation; char *addr; dbus_bool_t retval; @@ -467,19 +468,20 @@ process_config_every_time (BusContext *context, } /* Create activation subsystem */ - - if (is_reload) - bus_activation_unref (context->activation); - - context->activation = bus_activation_new (context, &full_address, - bus_config_parser_get_service_dirs (parser), - error); - if (context->activation == NULL) + new_activation = bus_activation_new (context, &full_address, + bus_config_parser_get_service_dirs (parser), + error); + if (new_activation == NULL) { _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; } + if (is_reload) + bus_activation_unref (context->activation); + + context->activation = new_activation; + /* Drop existing conf-dir watches (if applicable) */ if (is_reload) -- cgit