summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-21 18:10:49 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-21 18:10:49 +0200
commit35bb18851a2b07d2b7ca65c6722012cdc3399a32 (patch)
tree907b5fea76f432ae92132bc498cd3d24fb8525dd /src
parent0c5c00f6efffd3c2e7cef659eb9a928f70b844f0 (diff)
parent9de009a9f5dd0eb6eaba878a49d5f3317cc9b8a5 (diff)
Merge pull request #1315 from systemd-mailing-devs/1442692671-10134-1-git-send-email-dev@benjarobin.fr
systemd-notify: Always pass a valid pid to sd_pid_notify
Diffstat (limited to 'src')
-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 c303bcf718..772e3db69d 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -191,7 +191,7 @@ int main(int argc, char* argv[]) {
goto finish;
}
- r = sd_pid_notify(arg_pid, false, n);
+ r = sd_pid_notify(arg_pid ? arg_pid : getppid(), false, n);
if (r < 0) {
log_error_errno(r, "Failed to notify init system: %m");
goto finish;