1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-27 07:22:31 +03:00

job: add comment for EAGAIN job run case

This commit is contained in:
Lennart Poettering 2018-11-13 19:39:04 +01:00
parent ea2c0e4526
commit 8ebd9175db

View File

@ -618,7 +618,9 @@ int job_run_and_invalidate(Job *j) {
}
if (j) {
if (r == -EALREADY)
if (r == -EAGAIN)
job_set_state(j, JOB_WAITING); /* Hmm, not ready after all, let's return to JOB_WAITING state */
else if (r == -EALREADY)
r = job_finish_and_invalidate(j, JOB_DONE, true, true);
else if (r == -EBADR)
r = job_finish_and_invalidate(j, JOB_SKIPPED, true, false);
@ -632,8 +634,6 @@ int job_run_and_invalidate(Job *j) {
r = job_finish_and_invalidate(j, JOB_DEPENDENCY, true, false);
else if (r == -ESTALE)
r = job_finish_and_invalidate(j, JOB_ONCE, true, false);
else if (r == -EAGAIN)
job_set_state(j, JOB_WAITING);
else if (r < 0)
r = job_finish_and_invalidate(j, JOB_FAILED, true, false);
}