X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fscope.c;h=0f7c1f97ce79463a225b44e351a689dc67483c8a;hb=25fa306ed58b0b7fe30ca9be37c66a7b3b2de70e;hp=aa4978de4c8e28a1257a9df2d63e24ddae033d67;hpb=598459cebac7cc93089769a992e7b03287f77e12;p=elogind.git diff --git a/src/core/scope.c b/src/core/scope.c index aa4978de4..0f7c1f97c 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -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;