pub fn socket_is_connectable(path: &Path) -> boolExpand description
Test whether a Unix domain socket at path accepts connections.
Preferred over path.exists() because it avoids TOCTOU race conditions:
a socket file can exist but be stale (no listener).
Args:
path: Filesystem path of the Unix domain socket.
Usage:
ⓘ
if socket_is_connectable(&socket_path) {
println!("Agent socket is live");
}