X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fjob.c;fp=src%2Fcore%2Fjob.c;h=aa205ba781b0066c2289e64e1a239498b73bbfca;hb=f189ab18de69d3dee81117d7925fb370cd038f0f;hp=ef5dbce1a336af9464db91c34d77de8d39c5895a;hpb=fa1b91632c5220e6589007af4cd573ca909f915a;p=elogind.git diff --git a/src/core/job.c b/src/core/job.c index ef5dbce1a..aa205ba78 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -858,14 +858,18 @@ finish: static int job_dispatch_timer(sd_event_source *s, uint64_t monotonic, void *userdata) { Job *j = userdata; + Unit *u; assert(j); assert(s == j->timer_event_source); - log_warning_unit(j->unit->id, "Job %s/%s timed out.", - j->unit->id, job_type_to_string(j->type)); + log_warning_unit(j->unit->id, "Job %s/%s timed out.", j->unit->id, job_type_to_string(j->type)); + u = j->unit; job_finish_and_invalidate(j, JOB_TIMEOUT, true); + + failure_action(u->manager, u->job_timeout_action, u->job_timeout_reboot_arg); + return 0; }