return sd_event_source_set_enabled(s->timer_event_source, SD_EVENT_ONESHOT);
}
- 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);
+ return sd_event_add_time(
+ UNIT(s)->manager->event,
+ &s->timer_event_source,
+ CLOCK_MONOTONIC,
+ now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0,
+ scope_dispatch_timer, s);
}
static void scope_set_state(Scope *s, ScopeState state) {
r = unit_kill_context(
UNIT(s),
&s->kill_context,
- state != SCOPE_STOP_SIGTERM,
+ state != SCOPE_STOP_SIGTERM ? KILL_KILL : KILL_TERMINATE,
-1, -1, false);
if (r < 0)
goto fail;