ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From 66cd858045170353359d05dd0b4d259d6059de72 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 10 Mar 2014 18:22:55 +0100
Subject: [PATCH] logind: save session after setting the stopping flag

---
 src/login/logind-session.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index e519d35..3ab41e6 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -682,10 +682,9 @@ int session_stop(Session *s) {
         /* Kill cgroup */
         r = session_stop_scope(s);
 
-        session_save(s);
-
         s->stopping = true;
 
+        session_save(s);
         return r;
 }