mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
service: properly signal permanent failure of a service to its socket
This makes sure that a service is not indefinitely restarted in a tight
loop if it fails before it is able to process its socket.
This corrects the breakage introduced with
8d1b002a2e
. Shame on me.
This commit is contained in:
parent
abd55b1654
commit
464876c9c4
@ -1521,6 +1521,9 @@ static void service_set_state(Service *s, ServiceState state) {
|
||||
s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID;
|
||||
}
|
||||
|
||||
if (state == SERVICE_FAILED)
|
||||
service_notify_sockets_dead(s, s->result == SERVICE_FAILURE_START_LIMIT);
|
||||
|
||||
if (state == SERVICE_DEAD ||
|
||||
state == SERVICE_STOP ||
|
||||
state == SERVICE_STOP_SIGTERM ||
|
||||
@ -1528,7 +1531,6 @@ static void service_set_state(Service *s, ServiceState state) {
|
||||
state == SERVICE_STOP_POST ||
|
||||
state == SERVICE_FINAL_SIGTERM ||
|
||||
state == SERVICE_FINAL_SIGKILL ||
|
||||
state == SERVICE_FAILED ||
|
||||
state == SERVICE_AUTO_RESTART)
|
||||
service_notify_sockets_dead(s, false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user