]> git.proxmox.com Git - proxmox-backup.git/commitdiff
rest: daemon: comment why using a systemd barrier is important for main PID handover
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 1 Oct 2021 13:04:58 +0000 (15:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 2 Oct 2021 09:44:20 +0000 (11:44 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-rest-server/src/daemon.rs

index a2af2c6b899b3522b77a73034e3197cb8abb22e8..cf4a55324f69f043b63ba328cf2c13e5f6f881aa 100644 (file)
@@ -186,6 +186,8 @@ impl Reloader {
                 if let Err(e) = systemd_notify(SystemdNotify::MainPid(child)) {
                     log::error!("failed to notify systemd about the new main pid: {}", e);
                 }
+                // ensure systemd got the message about the new main PID before continuing, else it
+                // will get confused if the new main process sends its READY signal before that
                 if let Err(e) = systemd_notify_barrier() {
                     log::error!("failed to wait on systemd-processing: {}", e);
                 }