Skip to content

add recent sd_notify(3) notification commands#170

Open
rektide wants to merge 1 commit into
lucab:masterfrom
rektide:moar-notify
Open

add recent sd_notify(3) notification commands#170
rektide wants to merge 1 commit into
lucab:masterfrom
rektide:moar-notify

Conversation

@rektide
Copy link
Copy Markdown

@rektide rektide commented May 28, 2026

Add 8 missing sd_notify(3) notification commands

  • EXIT_STATUS
  • EXTEND_TIMEOUT_USEC
  • MAINPIDFDID
  • MONOTONIC_USEC
  • NOTIFYACCESS
  • RESTART_RESET
  • VARLINKERROR
  • WATCHDOG

As well as new NotifyState enum variants with input validation for NOTIFYACCESS.

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 new notify_barrier().

@rektide rektide changed the title add missing sd_notify(3) notification commands to NotifyState enum add missing sd_notify(3) notification commands May 28, 2026
@rektide rektide changed the title add missing sd_notify(3) notification commands add recent sd_notify(3) notification commands May 28, 2026
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.
Comment thread src/daemon.rs
}
}

fn sanity_check_mainpidfd(state: &[NotifyState], fds: &[RawFd]) -> Result<(), SdError> {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lucab
Copy link
Copy Markdown
Owner

lucab commented May 29, 2026

Thanks for the patch!
It looks like your PR is currently red because the MSRV/CI setup here got a bit stale.
I just did a small refresh in #171, if you rebase this one it should pass all checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants