summaryrefslogtreecommitdiff
path: root/src/logger.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-11 04:38:55 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-11 04:38:55 +0200
commitcd6d0a456bc9c45fa79316fc5896e4a3ae75a30b (patch)
tree92f326220de29f3c7eac7909e6b244fcba8086ab /src/logger.c
parent41b02ec77e54871eaa593c50fb31809814f627a7 (diff)
utmp: enable systemd-update-utmp by default
Diffstat (limited to 'src/logger.c')
-rw-r--r--src/logger.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/logger.c b/src/logger.c
index d4d964d1bb..3d69fcf2cd 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -548,8 +548,6 @@ int main(int argc, char *argv[]) {
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
- log_info("systemd-logger running as pid %lu", (unsigned long) getpid());
-
if ((n = sd_listen_fds(true)) < 0) {
log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
return 1;
@@ -563,6 +561,8 @@ int main(int argc, char *argv[]) {
if (server_init(&server, (unsigned) n) < 0)
return 3;
+ log_debug("systemd-logger running as pid %lu", (unsigned long) getpid());
+
sd_notify(false,
"READY=1\n"
"STATUS=Processing requests...");
@@ -588,15 +588,16 @@ int main(int argc, char *argv[]) {
if ((k = process_event(&server, &event)) < 0)
goto fail;
}
+
r = 0;
+ log_info("systemd-logger stopped as pid %lu", (unsigned long) getpid());
+
fail:
sd_notify(false,
"STATUS=Shutting down...");
server_done(&server);
- log_info("systemd-logger stopped as pid %lu", (unsigned long) getpid());
-
return r;
}