diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
commit | efeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch) | |
tree | c0b83368f18be983fcc763200c4c24d633244588 /src/shared/daemon-util.c | |
parent | Releasing progress-linux version 255.5-1~progress7.99u1. (diff) | |
download | systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.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; +} |