add recent sd_notify(3) notification commands#170
Open
rektide wants to merge 1 commit into
Open
Conversation
Add 8 new NotifyState variants for sd_notify commands that were previously unimplemented: ExitStatus, ExtendTimeoutUsec, Mainpidfdid, MonotonicUsec, NotifyAccess (with input validation), RestartReset, Varlinkerror, and WatchdogTrigger.
lucab
reviewed
May 29, 2026
| } | ||
| } | ||
|
|
||
| fn sanity_check_mainpidfd(state: &[NotifyState], fds: &[RawFd]) -> Result<(), SdError> { |
Owner
There was a problem hiding this comment.
I think we can fold this logic into the existing sanity_check_state_entries loop, so we don't need to iterate the same slice twice.
Owner
|
Thanks for the patch! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 8 missing
sd_notify(3)notification commandsEXIT_STATUSEXTEND_TIMEOUT_USECMAINPIDFDIDMONOTONIC_USECNOTIFYACCESSRESTART_RESETVARLINKERRORWATCHDOGAs well as new
NotifyStateenum variants with input validation forNOTIFYACCESS.Brings the enum from 14 to 22 variants, covering all simple KEY=VALUE sd_notify commands through systemd 261.
Still missing from full sd_notify(3) coverage:
BARRIER=1- requires a newnotify_barrier().