#include <systemd/sd-bus.h>
sd_bus_set_watch_bind()
sd_bus_get_watch_bind() may be used to query the current setting of this feature. It returns zero when the feature is disabled, and positive if enabled.
Note that no timeout is applied while we wait for the socket to appear. This means that any synchronous remote operation (such as sd_bus_call(3), sd_bus_add_match(3) or sd_bus_request_name(3)), that is used on a connection with this feature enabled that hasn't been established yet, might block forever if the socket is never created. However, asynchronous remote operations (such as sd_bus_send(3), sd_bus_call_async(3), sd_bus_add_match_async(3)) do not block in this case, and safely enqueue the requested operations to be dispatched the instant the connection is set up.
Use sd_bus_is_ready(3) to determine whether the connection is fully established, i.e. whether the peer socket has been bound, connected to and authenticated. Use sd_bus_set_connected_signal(3) to be notified when the connection is fully established.
On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style error code.
Returned errors may indicate the following problems:
-ECHILD
These APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd pkg-config(1) file.
systemd(1), sd-bus(3), inotify(7), sd_bus_call(3), sd_bus_add_match(3), sd_bus_request_name(3), sd_bus_is_ready(3), sd_bus_set_connected_signal(3)