[daemon-fix] Send SIGUSR1 signal to systemd for reconnecting to
authorSangyoon Jang <s89.jang@samsung.com>
Fri, 20 Dec 2013 07:40:50 +0000 (16:40 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Fri, 20 Dec 2013 09:53:42 +0000 (18:53 +0900)
kdbus bus daemon when starting system bus on boot
Change-Id: Iaf9e64eec65bdbad4b737969481d80acd447c63e

bus/main.c

index 472458e..960a9c7 100644 (file)
@@ -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));