Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce sd_notify_barrier #15547

Merged
merged 2 commits into from May 1, 2020
Merged

Commits on Apr 30, 2020

  1. Introduce sd_notify_barrier

    This adds the sd_notify_barrier function, to allow users to synchronize against
    the reception of sd_notify(3) status messages. It acts as a synchronization
    point, and a successful return gurantees that all previous messages have been
    consumed by the manager. This can be used to eliminate race conditions where
    the sending process exits too early for systemd to associate its PID to a
    cgroup and attribute the status message to a unit correctly.
    
    systemd-notify now uses this function for proper notification delivery and be
    useful for NotifyAccess=all units again in user mode, or in cases where it
    doesn't have a control process as parent.
    
    Fixes: systemd#2739
    kkdwivedi committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    4f07ddf View commit details
    Browse the repository at this point in the history
  2. man: sd_notify() race is gone with sd_notify_barrier()

    Add note for change of behaviour in systemd-notify, where parent pid trick
    is only used when --no-block is passed, and with enough privileges ofcourse.
    
    Also, fix a small error in systemd(1).
    kkdwivedi committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    5ec7a99 View commit details
    Browse the repository at this point in the history