Closed cbranch closed 1 month ago
Missed a clippy lint, this should pass now.
Do you have any opinions on the design choices made here? In particular, the changes added to support passing file descriptors through the notify socket.
For the benefit of notifs: outstanding issues should be resolved, please go ahead and merge/release as you see fit.
It would be good to have a listen_fds
with unset_env flag though!
Bumping this change - this would be great to get in a minor semver bump if you are ready to create one :)
https://crates.io/crates/sd-notify/0.4.3 is now out, sorry again for my abysmal response times :pensive:.
Support for systemd's file descriptor store is added using new NotifyState variants and a new
notify_with_fds
function, which passes file descriptors over the NOTIFY_SOCKET. The capability is gated behind a "fdstore" feature to avoid adding dependencies that were not previously required, and no existing API is touched except for the feature-gated NotifyState enum.As stored file descriptors can be named, you should be able to retrieve file descriptors by those names. This is implemented via the new
listen_fds_with_names
function, and is also useful if you are using socket activation.