chiark / gitweb /
hostnamed: introduce new "embedded" chassis type
[elogind.git] / src / core / scope.c
index aa4978de4c8e28a1257a9df2d63e24ddae033d67..0f7c1f97ce79463a225b44e351a689dc67483c8a 100644 (file)
@@ -83,7 +83,12 @@ 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, &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) {
@@ -238,7 +243,7 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) {
                 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;