X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fscope.c;h=be2a6370239f0762c327dcb6606100602c019d05;hb=085afe36cb823e7d5b8c5f3ef21ebb9639bac78b;hp=940e40dda78076d575bea7abf9496894ee00df02;hpb=a911bb9ab27ac0eb3bbf4e8b4109e5da9b88eee3;p=elogind.git diff --git a/src/core/scope.c b/src/core/scope.c index 940e40dda..be2a63702 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -54,6 +54,8 @@ static void scope_init(Unit *u) { cgroup_context_init(&s->cgroup_context); kill_context_init(&s->kill_context); + unit_cgroup_context_init_defaults(u, &s->cgroup_context); + UNIT(s)->ignore_on_isolate = true; UNIT(s)->ignore_on_snapshot = true; } @@ -88,7 +90,7 @@ static int scope_arm_timer(Scope *s) { return sd_event_source_set_enabled(s->timer_event_source, SD_EVENT_ONESHOT); } - return sd_event_add_monotonic(UNIT(s)->manager->event, now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0, scope_dispatch_timer, s, &s->timer_event_source); + return sd_event_add_monotonic(UNIT(s)->manager->event, &s->timer_event_source, now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0, scope_dispatch_timer, s); } static void scope_set_state(Scope *s, ScopeState state) {