summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps-util-unix.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-01-15 15:15:52 +0000
committerSimon McVittie <smcv@collabora.com>2018-03-02 14:48:49 +0000
commit18a0a8892b99f235e3897d9e5c600da00c61ef0a (patch)
treeb7c19d98de5a897a5ebfc4b9ac2a8b0e55b8dfcc /dbus/dbus-sysdeps-util-unix.c
parentbe4670767377a08b0c6cabbca1000ca614174c2c (diff)
downloaddbus-18a0a8892b99f235e3897d9e5c600da00c61ef0a.tar.gz
bus: Notify systemd when we are ready
Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104641 Reviewed-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'dbus/dbus-sysdeps-util-unix.c')
-rw-r--r--dbus/dbus-sysdeps-util-unix.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
index b841bf63..838cd932 100644
--- a/dbus/dbus-sysdeps-util-unix.c
+++ b/dbus/dbus-sysdeps-util-unix.c
@@ -1519,3 +1519,15 @@ _dbus_get_session_config_file (DBusString *str)
return _dbus_string_append (str, DBUS_SESSION_CONFIG_FILE);
}
+
+/**
+ * Report to a service manager that the daemon calling this function is
+ * ready for use. This is currently only implemented for systemd.
+ */
+void
+_dbus_daemon_report_ready (void)
+{
+#ifdef HAVE_SYSTEMD
+ sd_notify (0, "READY=1");
+#endif
+}