ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
698723
From 31aa21a13f9b91486b1a95c5b73fa088af77fcb4 Mon Sep 17 00:00:00 2001
698723
From: Lennart Poettering <lennart@poettering.net>
698723
Date: Mon, 6 Aug 2018 19:35:44 +0200
698723
Subject: [PATCH] logind: propagate session stop errors
698723
698723
Let's propagate errors from stopping sessions via seat_stop(). This is
698723
similar to how we propagate such errors in user_stop() for all sessions
698723
associated with a user.
698723
698723
Note that we propagate these errors, but we don't abort the function.
698723
698723
(cherry picked from commit e6958b7ea33813b085966ac25817a957c0dad7f9)
698723
698723
Related: #1642460
698723
---
698723
 src/login/logind-seat.c | 4 ++--
698723
 1 file changed, 2 insertions(+), 2 deletions(-)
698723
698723
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
698723
index 9e4f009643..96c34a6c9e 100644
698723
--- a/src/login/logind-seat.c
698723
+++ b/src/login/logind-seat.c
698723
@@ -431,7 +431,7 @@ int seat_start(Seat *s) {
698723
 }
698723
 
698723
 int seat_stop(Seat *s, bool force) {
698723
-        int r = 0;
698723
+        int r;
698723
 
698723
         assert(s);
698723
 
698723
@@ -441,7 +441,7 @@ int seat_stop(Seat *s, bool force) {
698723
                            "SEAT_ID=%s", s->id,
698723
                            LOG_MESSAGE("Removed seat %s.", s->id));
698723
 
698723
-        seat_stop_sessions(s, force);
698723
+        r = seat_stop_sessions(s, force);
698723
 
698723
         unlink(s->state_file);
698723
         seat_add_to_gc_queue(s);