From: Jonathon Kowalski Date: Sun, 20 Jan 2019 22:12:24 +0000 (+0000) Subject: Return -EAGAIN instead of -EALREADY from unit_reload X-Git-Tag: v242-rc1~333^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6255af75d7d198e631c70fa0b3a3d821a14c9227;p=thirdparty%2Fsystemd.git Return -EAGAIN instead of -EALREADY from unit_reload Fixes: #11499 Let's return -EAGAIN so that on state change, unit_process_job tries to add our job to run_queue again so that all the reloads that coalesced into the installed reload (which itself merged into a running one) inititally atleast runs *once*. This should ensure service picks up all config changes reliably. See the issue being fixed for a detailed explanation. --- diff --git a/src/core/unit.c b/src/core/unit.c index 24b14fbcd63..f4888ff4501 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1895,7 +1895,7 @@ int unit_reload(Unit *u) { state = unit_active_state(u); if (state == UNIT_RELOADING) - return -EALREADY; + return -EAGAIN; if (state != UNIT_ACTIVE) { log_unit_warning(u, "Unit cannot be reloaded because it is inactive.");