summaryrefslogtreecommitdiff
path: root/src/initctl.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/initctl.c
parent17586c16bac1d5ecf7d60ef57d18e82e36c288c1 (diff)
notify: add minimal readiness/status protocol for spawned daemons
Diffstat (limited to 'src/initctl.c')
-rw-r--r--src/initctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/initctl.c b/src/initctl.c
index 34c38839df..56ed5cdf30 100644
--- a/src/initctl.c
+++ b/src/initctl.c
@@ -354,6 +354,10 @@ int main(int argc, char *argv[]) {
if (server_init(&server, (unsigned) n) < 0)
return 2;
+ sd_notify(false,
+ "READY=1\n"
+ "STATUS=Processing requests...");
+
for (;;) {
struct epoll_event event;
int k;
@@ -378,6 +382,9 @@ int main(int argc, char *argv[]) {
r = 0;
fail:
+ sd_notify(false,
+ "STATUS=Shutting down...");
+
server_done(&server);
log_info("systemd-initctl stopped as pid %llu", (unsigned long long) getpid());