[systemd-commits] src/login
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Feb 7 08:50:35 PST 2014
src/login/logind-dbus.c | 10 ++++++++--
src/login/logind-session.c | 2 +-
src/login/logind.h | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit ba4c5d93b73ef7bba0ae0c6bf2b36a42360f7a34
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Feb 7 16:42:03 2014 +0100
logind: order all scopes after both systemd-logind.service and
systemd-user-sessions.service
This way at shutdown we can be sure that the sessions go away before the
network.
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 28b5cd4..30476f3 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2178,7 +2178,7 @@ int manager_start_scope(
pid_t pid,
const char *slice,
const char *description,
- const char *after,
+ const char *after, const char *after2,
sd_bus_error *error,
char **job) {
@@ -2219,12 +2219,18 @@ int manager_start_scope(
return r;
}
- if (!isempty(description)) {
+ if (!isempty(after)) {
r = sd_bus_message_append(m, "(sv)", "After", "as", 1, after);
if (r < 0)
return r;
}
+ if (!isempty(after2)) {
+ r = sd_bus_message_append(m, "(sv)", "After", "as", 1, after2);
+ if (r < 0)
+ return r;
+ }
+
/* cgroup empty notification is not available in containers
* currently. To make this less problematic, let's shorten the
* stop timeout for sessions, so that we don't wait
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 95105e5..f661cc8 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -490,7 +490,7 @@ static int session_start_scope(Session *s) {
if (!scope)
return log_oom();
- r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", &error, &job);
+ r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-session.service", &error, &job);
if (r < 0) {
log_error("Failed to start session scope %s: %s %s",
scope, bus_error_message(&error, r), error.name);
diff --git a/src/login/logind.h b/src/login/logind.h
index c1a5b6a..0bf52da 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -162,7 +162,7 @@ int manager_send_changed(Manager *manager, const char *property, ...) _sentinel_
int manager_dispatch_delayed(Manager *manager);
-int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, sd_bus_error *error, char **job);
+int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *after2, sd_bus_error *error, char **job);
int manager_start_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
int manager_abandon_scope(Manager *manager, const char *scope, sd_bus_error *error);
More information about the systemd-commits
mailing list