summaryrefslogtreecommitdiff
path: root/src/notify
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-05-03 14:13:58 +0200
committerLennart Poettering <lennart@poettering.net>2023-05-03 18:21:42 +0200
commit0de343187127f6a5a93602608812e60fc4092c9a (patch)
treeaf1d8c130a51efa6b0009d0ee47d3813eb97369d /src/notify
parentca71b1d9669ee572ed122c627bf58a7b12ea7677 (diff)
downloadsystemd-0de343187127f6a5a93602608812e60fc4092c9a.tar.gz
sd-daemon: add sd_pid_notify_barrier() call and use it in systemd-notify
Previously we'd honour --pid= from the main notification we send, but not from the barrier. This is confusing at best. Let's fix that.
Diffstat (limited to 'src/notify')
-rw-r--r--src/notify/notify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/notify/notify.c b/src/notify/notify.c
index 21e004e417..8a551a9399 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -447,7 +447,7 @@ static int run(int argc, char* argv[]) {
arg_fds = fdset_free(arg_fds); /* Close before we execute anything */
if (!arg_no_block) {
- r = sd_notify_barrier(0, 5 * USEC_PER_SEC);
+ r = sd_pid_notify_barrier(source_pid, /* unset_environment= */ false, 5 * USEC_PER_SEC);
if (r < 0)
return log_error_errno(r, "Failed to invoke barrier: %m");
if (r == 0)