summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-21 17:03:15 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-21 17:24:21 +0200
commit308d72dc1e2106f94ae637e2ea510e8d466d2af1 (patch)
treeb7cae9d62f78eb64810065245ab39e9657bad21d /src/test
parent70af4d17dafe81acc96f71f4ec06fbea7386bc38 (diff)
core: allow informing systemd about service status changes with RELOADING=1 and STOPPING=1 sd_notify() messages
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-daemon.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/test/test-daemon.c b/src/test/test-daemon.c
index bcc049b325..7e0ac754d1 100644
--- a/src/test/test-daemon.c
+++ b/src/test/test-daemon.c
@@ -25,13 +25,29 @@
int main(int argc, char*argv[]) {
- sd_notify(0, "STATUS=Starting up");
+ sd_notify(0,
+ "STATUS=Starting up");
+ sleep(5);
+
+ sd_notify(0,
+ "STATUS=Running\n"
+ "READY=1");
+ sleep(5);
+
+ sd_notify(0,
+ "STATUS=Reloading\n"
+ "RELOADING=1");
sleep(5);
+
sd_notify(0,
"STATUS=Running\n"
"READY=1");
- sleep(10);
- sd_notify(0, "STATUS=Quitting");
+ sleep(5);
+
+ sd_notify(0,
+ "STATUS=Quitting\n"
+ "STOPPING=1");
+ sleep(5);
return 0;
}