mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
core/unit: always propagate reload_result as job result, even if state is unexpected
The end state of unit shouldn't have any impact on reload job, as either way the reload operation has been aborted.
This commit is contained in:
@@ -2649,9 +2649,7 @@ static bool unit_process_job(Job *j, UnitActiveState ns, bool reload_success) {
|
||||
job_finish_and_invalidate(j, reload_success ? JOB_DONE : JOB_FAILED, true, false);
|
||||
else if (!IN_SET(ns, UNIT_ACTIVATING, UNIT_RELOADING, UNIT_REFRESHING)) {
|
||||
unexpected = true;
|
||||
|
||||
if (UNIT_IS_INACTIVE_OR_FAILED(ns))
|
||||
job_finish_and_invalidate(j, ns == UNIT_FAILED ? JOB_FAILED : JOB_CANCELED, true, false);
|
||||
job_finish_and_invalidate(j, reload_success ? JOB_CANCELED : JOB_FAILED, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user