diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
commit | 78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch) | |
tree | f515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/shared/daemon-util.c | |
parent | Adding debian version 255.5-1. (diff) | |
download | systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip |
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/daemon-util.c')
-rw-r--r-- | src/shared/daemon-util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shared/daemon-util.c b/src/shared/daemon-util.c index 32180a1..aa386b4 100644 --- a/src/shared/daemon-util.c +++ b/src/shared/daemon-util.c @@ -4,6 +4,7 @@ #include "fd-util.h" #include "log.h" #include "string-util.h" +#include "time-util.h" static int notify_remove_fd_warn(const char *name) { int r; @@ -74,3 +75,18 @@ int notify_push_fdf(int fd, const char *format, ...) { return notify_push_fd(fd, name); } + +int notify_reloading_full(const char *status) { + int r; + + r = sd_notifyf(/* unset_environment = */ false, + "RELOADING=1\n" + "MONOTONIC_USEC=" USEC_FMT + "%s%s", + now(CLOCK_MONOTONIC), + status ? "\nSTATUS=" : "", strempty(status)); + if (r < 0) + return log_debug_errno(r, "Failed to notify service manager for reloading status: %m"); + + return 0; +} |