From: Mike Yuan Date: Sat, 15 Nov 2025 20:06:39 +0000 (+0100) Subject: core/unit: mark running reload job as canceled if the unit deactivated X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5b1a794612b8802fcfd818be04814e9c0423840;p=thirdparty%2Fsystemd.git core/unit: mark running reload job as canceled if the unit deactivated The semantics of reload is that the service updates its extrinsic state and continues execution. If it actually deactivated we shouldn't spuriously notify the caller that reload succeeded. --- diff --git a/src/core/unit.c b/src/core/unit.c index b6dc962f866..7675082e229 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2651,7 +2651,7 @@ static bool unit_process_job(Job *j, UnitActiveState ns, bool reload_success) { unexpected = true; if (UNIT_IS_INACTIVE_OR_FAILED(ns)) - job_finish_and_invalidate(j, ns == UNIT_FAILED ? JOB_FAILED : JOB_DONE, true, false); + job_finish_and_invalidate(j, ns == UNIT_FAILED ? JOB_FAILED : JOB_CANCELED, true, false); } }