From d41ab7eef29714035e686b708567b970751c464c Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 20 Dec 2013 16:40:50 +0900 Subject: [PATCH] [daemon-fix] Send SIGUSR1 signal to systemd for reconnecting to kdbus bus daemon when starting system bus on boot Change-Id: Iaf9e64eec65bdbad4b737969481d80acd447c63e --- bus/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bus/main.c b/bus/main.c index 472458e..960a9c7 100644 --- a/bus/main.c +++ b/bus/main.c @@ -647,6 +647,18 @@ main (int argc, char **argv) #endif #endif /* DBUS_UNIX */ +#ifdef ENABLE_KDBUS_TRANSPORT + if (bus_context_get_systemd_activation(context) == TRUE) + { + if (strncmp(bus_context_get_address(context), "kdbus:", strlen("kdbus:")) == 0 && + !strcmp(bus_context_get_type(context), "system") && + getuid() == 0) + { + kill (1, SIGUSR1); + } + } +#endif + _dbus_verbose ("We are on D-Bus...\n"); _dbus_loop_run (bus_context_get_loop (context)); -- 2.7.4