core/service: forbid reverting STOPPING=1
We don't permit state transition from STOPPING back to RUNNING, hence refrain from resetting notify_state too.
This commit is contained in:
+8
-1
@@ -4769,7 +4769,14 @@ static void service_notify_message_process_state(Service *s, char * const *tags)
|
||||
if (IN_SET(s->state, SERVICE_RUNNING, SERVICE_RELOAD_SIGNAL, SERVICE_RELOAD_NOTIFY, SERVICE_REFRESH_EXTENSIONS))
|
||||
service_enter_stop_by_notify(s);
|
||||
|
||||
} else if (strv_contains(tags, "READY=1")) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Disallow resurrecting a dying service */
|
||||
if (s->notify_state == NOTIFY_STOPPING)
|
||||
return;
|
||||
|
||||
if (strv_contains(tags, "READY=1")) {
|
||||
|
||||
s->notify_state = NOTIFY_READY;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user