systemd-notify: Always pass a valid pid to sd_pid_notify
This commit is contained in:
Lennart Poettering
2015-09-21 18:10:49 +02:00
+1 -1
View File
@@ -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;