mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
service: allow MainPID= updates during stop of the service
Example use case is a migration of MainPID to an auxiliary scope.
This commit is contained in:
parent
622678edd7
commit
f5b72af50d
|
@ -4385,7 +4385,7 @@ static void service_notify_message(
|
|||
|
||||
/* Interpret MAINPID= */
|
||||
e = strv_find_startswith(tags, "MAINPID=");
|
||||
if (e && IN_SET(s->state, SERVICE_START, SERVICE_START_POST, SERVICE_RUNNING, SERVICE_RELOAD, SERVICE_RELOAD_SIGNAL, SERVICE_RELOAD_NOTIFY)) {
|
||||
if (e && IN_SET(s->state, SERVICE_START, SERVICE_START_POST, SERVICE_RUNNING, SERVICE_STOP_SIGTERM, SERVICE_RELOAD, SERVICE_RELOAD_SIGNAL, SERVICE_RELOAD_NOTIFY)) {
|
||||
_cleanup_(pidref_done) PidRef new_main_pid = PIDREF_NULL;
|
||||
|
||||
r = pidref_set_pidstr(&new_main_pid, e);
|
||||
|
|
Loading…
Reference in a new issue