X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjob.c;h=30a46bea8bfea54e112e64c7008b58ee425b475d;hb=8e486ef03b992d4c0d373195f5e8d1c3a200bc30;hp=8ab12cd62410eb3287e4a6c052915108b79fa604;hpb=e6a3ff9593e88a57390534b8ad3de7a57cafbdb0;p=elogind.git diff --git a/src/job.c b/src/job.c index 8ab12cd62..30a46bea8 100644 --- a/src/job.c +++ b/src/job.c @@ -385,6 +385,9 @@ int job_run_and_invalidate(Job *j) { case JOB_START: r = unit_start(j->unit); + + /* If this unit cannot be started, then simply + * wait */ if (r == -EBADR) r = 0; break; @@ -402,6 +405,11 @@ int job_run_and_invalidate(Job *j) { case JOB_STOP: r = unit_stop(j->unit); + + /* If this unit cannot stopped, then simply + * wait. */ + if (r == -EBADR) + r = 0; break; case JOB_RELOAD: @@ -523,7 +531,7 @@ int job_finish_and_invalidate(Job *j, bool success) { } else if (t == JOB_STOP) { - SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICTS], i) + SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICTED_BY], i) if (other->meta.job && (other->meta.job->type == JOB_START || other->meta.job->type == JOB_VERIFY_ACTIVE ||