1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

Merge pull request #1213 from evverx/systemd-notify-log

notify: log error when sd_pid_notify() == 0
This commit is contained in:
Lennart Poettering 2015-09-09 15:54:41 +02:00
commit c36d25218b

View File

@ -195,10 +195,10 @@ int main(int argc, char* argv[]) {
if (r < 0) {
log_error_errno(r, "Failed to notify init system: %m");
goto finish;
}
if (r == 0)
} else if (r == 0) {
log_error("No status data could be sent: $NOTIFY_SOCKET was not set");
r = -EOPNOTSUPP;
}
finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;