summaryrefslogtreecommitdiff
path: root/src/logger.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-16 05:10:31 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-16 05:10:31 +0200
commit8c47c7325fa1ab72febf807f8831ff24c75fbf45 (patch)
tree3a116267ab7c0edbfdb32bbd2b6ea222436fcce3 /src/logger.c
parent17586c16bac1d5ecf7d60ef57d18e82e36c288c1 (diff)
notify: add minimal readiness/status protocol for spawned daemons
Diffstat (limited to 'src/logger.c')
-rw-r--r--src/logger.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/logger.c b/src/logger.c
index 5c7e4ee42b..48eee6cd12 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -547,6 +547,10 @@ int main(int argc, char *argv[]) {
if (server_init(&server, (unsigned) n) < 0)
return 3;
+ sd_notify(false,
+ "READY=1\n"
+ "STATUS=Processing requests...");
+
for (;;) {
struct epoll_event event;
int k;
@@ -571,6 +575,9 @@ int main(int argc, char *argv[]) {
r = 0;
fail:
+ sd_notify(false,
+ "STATUS=Shutting down...");
+
server_done(&server);
log_info("systemd-logger stopped as pid %llu", (unsigned long long) getpid());