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.
This commit is contained in:
parent
8464d9e0dc
commit
6255af75d7
|
@ -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.");
|
||||
|
|
Loading…
Reference in a new issue