chiark / gitweb /
hashmap: allow hashmap_move() to fail
[elogind.git] / src / test / test-daemon.c
index 3215f0c560c3635a1b576a0131b2726311f00425..7e0ac754d160a65798ba4eb01fb971ef125ed0f0 100644 (file)
 
 #include <unistd.h>
 
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-daemon.h"
 
 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;
 }