summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-17 04:09:28 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-17 04:09:28 +0200
commitfaf919f1ebebdfc13f769bb6585e64e7ad4b301b (patch)
tree8fb54ae1edeffef63cf72fb40b278b57cb727e18 /src/manager.c
parent064f51fa29c1dfd7c0704feb969eb59119e57854 (diff)
job: timeout every job independently of the unit
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/manager.c b/src/manager.c
index 58848356ea..7b2586fb0c 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1124,6 +1124,7 @@ static int transaction_apply(Manager *m) {
job_add_to_run_queue(j);
job_add_to_dbus_queue(j);
+ job_start_timer(j);
}
/* As last step, kill all remaining job dependencies. */
@@ -2022,7 +2023,8 @@ static int process_event(Manager *m, struct epoll_event *ev) {
UNIT_VTABLE(w->data.unit)->fd_event(w->data.unit, w->fd, ev->events, w);
break;
- case WATCH_TIMER: {
+ case WATCH_UNIT_TIMER:
+ case WATCH_JOB_TIMER: {
uint64_t v;
ssize_t k;
@@ -2035,7 +2037,10 @@ static int process_event(Manager *m, struct epoll_event *ev) {
return k < 0 ? -errno : -EIO;
}
- UNIT_VTABLE(w->data.unit)->timer_event(w->data.unit, v, w);
+ if (w->type == WATCH_UNIT_TIMER)
+ UNIT_VTABLE(w->data.unit)->timer_event(w->data.unit, v, w);
+ else
+ job_timer_event(w->data.job, v, w);
break;
}