summaryrefslogtreecommitdiff
path: root/src/core/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-11-24 18:47:48 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-14 13:38:24 +0100
commit631b676bb7636971c2e1c42528f49378d8970696 (patch)
treed7af017ec6e44c95f63fd9e14db30162ac9cab1b /src/core/job.c
parent290f0ff9aa4fa184de6810344415959e0b466cdb (diff)
core: explicitly verify that BindsTo= deps are in order before dispatch start operation of a unit
Let's make sure we verify that all BindsTo= are in order before we actually go and dispatch a start operation to a unit. Normally the job queue should already have made sure all deps are in order, but this might not have been sufficient in two cases: a) when the user changes deps during runtime and reloads the daemon, and b) when the user placed BindsTo= dependencies without matching After= dependencies, so that we don't actually wait for the bound to unit to be up before upping also the binding unit. See: #4725
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 00f7d7998f..07f4b74c5c 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -627,6 +627,8 @@ int job_run_and_invalidate(Job *j) {
r = job_finish_and_invalidate(j, JOB_ASSERT, true, false);
else if (r == -EOPNOTSUPP)
r = job_finish_and_invalidate(j, JOB_UNSUPPORTED, true, false);
+ else if (r == -ENOLINK)
+ r = job_finish_and_invalidate(j, JOB_DEPENDENCY, true, false);
else if (r == -EAGAIN)
job_set_state(j, JOB_WAITING);
else if (r < 0)