mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
service: fixup ExecStop for socket-activated shutdown (#4120)
Previous fix didn't consider handling multiple ExecStop commands.
This commit is contained in:
parent
f35c467db3
commit
7dd736abec
@ -1261,8 +1261,7 @@ static int service_spawn(
|
||||
|
||||
/* ENOTCONN is legitimate if the endpoint disappeared on shutdown.
|
||||
* This connection is over, but the socket unit lives on. */
|
||||
if (r != -ENOTCONN ||
|
||||
(c != s->exec_command[SERVICE_EXEC_STOP] && c != s->exec_command[SERVICE_EXEC_STOP_POST]))
|
||||
if (r != -ENOTCONN || !IN_SET(s->control_command_id, SERVICE_EXEC_STOP, SERVICE_EXEC_STOP_POST))
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user