pub fn notify_socket() -> Option<Box<SocketAddr>>Expand description
Retrieve notification socket address.
The first call to this function will return the system manager
notification socket address as a boxed SocketAddr, as provided
through the NOTIFY_SOCKET environment variable, or None if
unavailable. Subsequent calls will return None.
The implementation currently supports only UNIX domain sockets,
both path‐based and abstract. VSOCK sockets are not supported.
§Example
ⓘ
use std::os::unix::net::UnixDatagram;
let notify = UnixDatagram::unbound()?;
notify.connect_addr(µsd::notify_socket().unwrap())?;
notify.send("READY=1".as_bytes())?;