d7c6ad60dd
sd_notify is not synchronous, iow. it only waits until the message reaches the queue not until it is processed by systemd when the process that sent such a message exits before systemd could process it, it cannot be associated to the correct pid so in case of reloading, we send a message with 'MAINPID=<newpid>' to signal that it will change. if now the old process exits before systemd knows this, it will not accept the 'READY=1' message from the child, since it rejects the MAINPID change since there is no (AFAICS) library interface to check the unit status, we use 'systemctl is-active <SERVICE_NAME>' to check the state until it is not 'reloading' anymore. on newer systemd versions, there is 'sd_notify_barrier' which would allow us to wait for systemd to have all messages from the current pid to be processed before acknowledging to the child, but on buster the systemd version is to old... Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> |
||
---|---|---|
.. | ||
disks | ||
systemd | ||
acl.rs | ||
apt.rs | ||
async_channel_writer.rs | ||
async_io.rs | ||
borrow.rs | ||
broadcast_future.rs | ||
cert.rs | ||
daemon.rs | ||
disks.rs | ||
file_logger.rs | ||
format.rs | ||
fs.rs | ||
fuse_loop.rs | ||
http.rs | ||
logrotate.rs | ||
loopdev.rs | ||
lru_cache.rs | ||
nom.rs | ||
parallel_handler.rs | ||
process_locker.rs | ||
runtime.rs | ||
socket.rs | ||
statistics.rs | ||
std_channel_writer.rs | ||
subscription.rs | ||
systemd.rs | ||
ticket.rs | ||
wrapped_reader_stream.rs | ||
xattr.rs | ||
zip.rs |