chiark / gitweb /
core: convert PID 1 to libsystemd-bus
[elogind.git] / src / login / logind-session-dbus.c
index 167d2ab8b4da98b43691e89d604ad6ee56f89d5f..4995391443fe13ec6cf2b41ca8d95145ec70d74a 100644 (file)
@@ -25,6 +25,7 @@
 #include "util.h"
 #include "strv.h"
 #include "bus-util.h"
+#include "bus-errors.h"
 
 #include "logind.h"
 #include "logind-session.h"
@@ -644,14 +645,14 @@ int session_send_create_reply(Session *s, sd_bus_error *error) {
         if (error)
                 return sd_bus_reply_method_error(s->manager->bus, c, error);
 
-        /* Update the session state file before we notify the client
-         * about the result. */
-        session_save(s);
-
         fifo_fd = session_create_fifo(s);
         if (fifo_fd < 0)
                 return fifo_fd;
 
+        /* Update the session state file before we notify the client
+         * about the result. */
+        session_save(s);
+
         p = session_bus_path(s);
         if (!p)
                 return -ENOMEM;