chiark / gitweb /
logind: add needed include for sd_notify()
[elogind.git] / src / login / logind.c
index 333d5f85bdd09c808c310bc7d513a2c3cd864f58..99534a52eddabc9b8b2483b09704b71d6039aabf 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/vt.h>
 
 #include "logind.h"
+#include "sd-daemon.h"
 #include "dbus-common.h"
 #include "dbus-loop.h"
 #include "strv.h"
@@ -1224,9 +1225,20 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
+        log_debug("systemd-logind running as pid %lu", (unsigned long) getpid());
+
+        sd_notify(false,
+                  "READY=1\n"
+                  "STATUS=Processing requests...");
+
         r = manager_run(m);
 
+        log_debug("systemd-logind stopped as pid %lu", (unsigned long) getpid());
+
 finish:
+        sd_notify(false,
+                  "STATUS=Shutting down...");
+
         if (m)
                 manager_free(m);