diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-02-24 03:24:23 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-02-24 03:24:23 +0100 |
commit | c0daa706d329d6cc593949b7d150d4972289ba93 (patch) | |
tree | 7ab14a6954c7c7de5f09e9c86910034f6d390ed1 /src/job.c | |
parent | a6a9a78d95e9ba302b259f6871433f510c606308 (diff) |
job: also trigger on-failure dependencies when jobs faile due to dependencies, timeout
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -549,6 +549,13 @@ int job_finish_and_invalidate(Job *j, JobResult result) { } } + /* Trigger OnFailure dependencies that are not generated by + * the unit itself. We don't tread JOB_CANCELED as failure in + * this context. And JOB_FAILURE is already handled by the + * unit itself. */ + if (result == JOB_TIMEOUT || result == JOB_DEPENDENCY) + unit_trigger_on_failure(u); + /* Try to start the next jobs that can be started */ SET_FOREACH(other, u->meta.dependencies[UNIT_AFTER], i) if (other->meta.job) |