[][src]Function sd_notify::notify

pub fn notify(unset_env: bool, state: &[NotifyState]) -> Result<()>

Sends the service manager a list of state changes.

If the unset_env parameter is set, the NOTIFY_SOCKET environment variable will be unset before returning. Further calls to sd_notify will fail, but chlid processes will no longer inherit the variable.

Limitations

The implementation of this function is somewhat naive: it doesn't support sending notifications on behalf of other processes, doesn't pass file descriptors, doesn't send credentials, and does not increase the send buffer size. It's still useful, though, in usual situations.

Example

let _ = sd_notify::notify(true, &[NotifyState::Ready]);