From: Evgeny Vereshchagin Date: Wed, 9 Sep 2015 11:51:58 +0000 (+0300) Subject: notify: log error when sd_pid_notify() == 0 X-Git-Tag: v227~155^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1213%2Fhead;p=thirdparty%2Fsystemd.git notify: log error when sd_pid_notify() == 0 --- diff --git a/src/notify/notify.c b/src/notify/notify.c index c920b292972..c303bcf7183 100644 --- a/src/notify/notify.c +++ b/src/notify/notify.c @@ -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;