From 8a5cd31e5fa0b1313a196b902e4b3c4603e7dfdf Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 15 Dec 2017 22:24:52 +0100 Subject: sd-bus: optionally, use inotify to wait for bus sockets to appear This adds a "watch-bind" feature to sd-bus connections. If set and the AF_UNIX socket we are connecting to doesn't exist yet, we'll establish an inotify watch instead, and wait for the socket to appear. In other words, a missing AF_UNIX just makes connecting slower. This is useful for daemons such as networkd or resolved that shall be able to run during early-boot, before dbus-daemon is up, and want to connect to dbus-daemon as soon as it becomes ready. --- src/systemd/sd-bus.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/systemd') diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index c5c7096d55..66bc48842b 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -150,8 +150,10 @@ int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b); int sd_bus_get_allow_interactive_authorization(sd_bus *bus); int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b); int sd_bus_get_exit_on_disconnect(sd_bus *bus); +int sd_bus_set_watch_bind(sd_bus *bus, int b); +int sd_bus_get_watch_bind(sd_bus *bus); -int sd_bus_start(sd_bus *ret); +int sd_bus_start(sd_bus *bus); int sd_bus_try_close(sd_bus *bus); void sd_bus_close(sd_bus *bus); -- cgit v1.2.1