diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-15 22:24:52 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-05-30 07:49:55 +0200 |
commit | 004bb7654fb0ca644e70ae22221adfecdcb4a8ed (patch) | |
tree | 7163c295455c55b82b02e6d1c372a8f3423f9a18 /src/systemd | |
parent | 5295adaf6b864f44b0f6ad8ec5aeda540d9c236e (diff) |
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.
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-bus.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index c13c9b7d3..62f10b632 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); |