chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: spawn pager only for commands that generates long output
[elogind.git]
/
src
/
job.c
diff --git
a/src/job.c
b/src/job.c
index 8ab12cd62410eb3287e4a6c052915108b79fa604..30a46bea8bfea54e112e64c7008b58ee425b475d 100644
(file)
--- 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);
case JOB_START:
r = unit_start(j->unit);
+
+ /* If this unit cannot be started, then simply
+ * wait */
if (r == -EBADR)
r = 0;
break;
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);
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:
break;
case JOB_RELOAD:
@@
-523,7
+531,7
@@
int job_finish_and_invalidate(Job *j, bool success) {
} else if (t == JOB_STOP) {
} else if (t == JOB_STOP) {
- SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICT
S
], i)
+ SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICT
ED_BY
], i)
if (other->meta.job &&
(other->meta.job->type == JOB_START ||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
if (other->meta.job &&
(other->meta.job->type == JOB_START ||
other->meta.job->type == JOB_VERIFY_ACTIVE ||