summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyotaek Shim <hyotaek.shim@samsung.com>2017-02-21 16:04:31 -0800
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2017-02-21 16:04:31 -0800
commite3dc5da3dfaaed4db588bf07c38b9879c5a464c5 (patch)
treeb274893d22216399843f59a56a67f6a772a797d2
parent19f1b4fa995b577b6810b28e251b062fcafd28d5 (diff)
parentbbacc6024e474f4e7dd1387618209cab9524a95c (diff)
downloaddbus-e3dc5da3dfaaed4db588bf07c38b9879c5a464c5.tar.gz
dbus-e3dc5da3dfaaed4db588bf07c38b9879c5a464c5.tar.bz2
dbus-e3dc5da3dfaaed4db588bf07c38b9879c5a464c5.zip
-rw-r--r--bus/dbus.service.in1
-rw-r--r--bus/main.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/bus/dbus.service.in b/bus/dbus.service.in
index e8662afd..126601ba 100644
--- a/bus/dbus.service.in
+++ b/bus/dbus.service.in
@@ -4,6 +4,7 @@ Documentation=man:dbus-daemon(1)
Requires=dbus.socket
[Service]
+Type=notify
ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --systemd-activation
ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
OOMScoreAdjust=-900
diff --git a/bus/main.c b/bus/main.c
index 9711c972..28ea39a1 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -42,6 +42,10 @@
#include "apparmor.h"
#include "audit.h"
+#ifdef HAVE_SYSTEMD
+#include <systemd/sd-daemon.h>
+#endif
+
static BusContext *context;
#ifdef DBUS_UNIX
@@ -657,6 +661,10 @@ main (int argc, char **argv)
dbus_set_protocol_version (DBUS_MAJOR_PROTOCOL_VERSION);
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "READY=1");
+#endif
+
_dbus_verbose ("We are on D-Bus...\n");
_dbus_loop_run (bus_context_get_loop (context));