chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: hide all information on --kill-mode= since it is mostly useless
[elogind.git]
/
src
/
logind-user.c
diff --git
a/src/logind-user.c
b/src/logind-user.c
index a4f78869a31d1078342fdaa847c5ab506b537448..dacf148f7829e603c2224447408054e8cb052a58 100644
(file)
--- a/
src/logind-user.c
+++ b/
src/logind-user.c
@@
-246,6
+246,10
@@
static int user_create_cgroup(User *u) {
u->cgroup_path = p;
STRV_FOREACH(k, u->manager->controllers) {
u->cgroup_path = p;
STRV_FOREACH(k, u->manager->controllers) {
+
+ if (strv_contains(u->manager->reset_controllers, *k))
+ continue;
+
r = cg_create(*k, p);
if (r < 0)
log_warning("Failed to create cgroup %s:%s: %s", *k, p, strerror(-r));
r = cg_create(*k, p);
if (r < 0)
log_warning("Failed to create cgroup %s:%s: %s", *k, p, strerror(-r));
@@
-285,13
+289,13
@@
int user_start(User *u) {
if (r < 0)
return r;
if (r < 0)
return r;
- /* Save new user data */
- user_save(u);
-
dual_timestamp_get(&u->timestamp);
u->started = true;
dual_timestamp_get(&u->timestamp);
u->started = true;
+ /* Save new user data */
+ user_save(u);
+
user_send_signal(u, true);
return 0;
user_send_signal(u, true);
return 0;
@@
-453,12
+457,15
@@
int user_get_idle_hint(User *u, dual_timestamp *t) {
return idle_hint;
}
return idle_hint;
}
-int user_check_gc(User *u) {
+int user_check_gc(User *u
, bool drop_not_started
) {
int r;
char *p;
assert(u);
int r;
char *p;
assert(u);
+ if (drop_not_started && !u->started)
+ return 0;
+
if (u->sessions)
return 1;
if (u->sessions)
return 1;