summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-27 23:06:49 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-27 23:06:49 +0200
commitb6f68af13cadcbbfefd38cf8ff9a46553576f3af (patch)
tree94edad4c938f323086b7bf71909eb3dadf567f29
parentaccaeded150b13685b188ea69f4b608d3cfa5463 (diff)
logind: when the leader of a session exited, don't fail
-rw-r--r--src/logind-session.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logind-session.c b/src/logind-session.c
index cbde810502..705b1e41cf 100644
--- a/src/logind-session.c
+++ b/src/logind-session.c
@@ -408,9 +408,11 @@ static int session_create_one_group(Session *s, const char *controller, const ch
assert(controller);
assert(path);
- if (s->leader > 0)
+ if (s->leader > 0) {
r = cg_create_and_attach(controller, path, s->leader);
- else
+ if (r < 0)
+ r = cg_create(controller, path);
+ } else
r = cg_create(controller, path);
if (r < 0)