diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-21 17:03:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-21 17:24:21 +0200 |
commit | 308d72dc1e2106f94ae637e2ea510e8d466d2af1 (patch) | |
tree | b7cae9d62f78eb64810065245ab39e9657bad21d /src/test | |
parent | 70af4d17dafe81acc96f71f4ec06fbea7386bc38 (diff) | |
download | systemd-308d72dc1e2106f94ae637e2ea510e8d466d2af1.tar.gz systemd-308d72dc1e2106f94ae637e2ea510e8d466d2af1.tar.bz2 systemd-308d72dc1e2106f94ae637e2ea510e8d466d2af1.zip |
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.c | 22 |
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; } |