From 6255af75d7d198e631c70fa0b3a3d821a14c9227 Mon Sep 17 00:00:00 2001 From: Jonathon Kowalski Date: Sun, 20 Jan 2019 22:12:24 +0000 Subject: [PATCH] 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. --- src/core/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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."); -- 2.47.3