chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix possible lack of status messages on shutdown/reboot
[elogind.git]
/
src
/
core
/
scope.c
diff --git
a/src/core/scope.c
b/src/core/scope.c
index 20a969d913d30c605a61304ef3654ea4dffed9de..41da3b9378dc2f083fa8d5bf119aadfd783ef826 100644
(file)
--- a/
src/core/scope.c
+++ b/
src/core/scope.c
@@
-46,7
+46,7
@@
static void scope_init(Unit *u) {
assert(u);
assert(u->load_state == UNIT_STUB);
assert(u);
assert(u->load_state == UNIT_STUB);
- s->timeout_stop_usec =
DEFAULT_TIMEOUT_USEC
;
+ s->timeout_stop_usec =
u->manager->default_timeout_stop_usec
;
watch_init(&s->timer_watch);
watch_init(&s->timer_watch);
@@
-239,6
+239,9
@@
static int scope_start(Unit *u) {
assert(s);
assert(s);
+ if (s->state == SCOPE_FAILED)
+ return -EPERM;
+
if (s->state == SCOPE_STOP_SIGTERM ||
s->state == SCOPE_STOP_SIGKILL)
return -EAGAIN;
if (s->state == SCOPE_STOP_SIGTERM ||
s->state == SCOPE_STOP_SIGKILL)
return -EAGAIN;
@@
-254,7
+257,7
@@
static int scope_start(Unit *u) {
return r;
}
return r;
}
- r = cg_attach_many_
with_mask(u->cgroup_mask
, u->cgroup_path, s->pids);
+ r = cg_attach_many_
everywhere(u->manager->cgroup_supported
, u->cgroup_path, s->pids);
if (r < 0)
return r;
if (r < 0)
return r;