1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00
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
commit 35bb18851a

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;