chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: properly signal permanent failure of a service to its socket
[elogind.git]
/
src
/
core
/
service.c
diff --git
a/src/core/service.c
b/src/core/service.c
index ebd0baea8961b84ddaa5073e9efa714d12a70966..9e46dbae9478b7aab8177018c395da2e8cd3f68e 100644
(file)
--- a/
src/core/service.c
+++ b/
src/core/service.c
@@
-1521,6
+1521,9
@@
static void service_set_state(Service *s, ServiceState state) {
s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID;
}
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 ||
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_STOP_POST ||
state == SERVICE_FINAL_SIGTERM ||
state == SERVICE_FINAL_SIGKILL ||
- state == SERVICE_FAILED ||
state == SERVICE_AUTO_RESTART)
service_notify_sockets_dead(s, false);
state == SERVICE_AUTO_RESTART)
service_notify_sockets_dead(s, false);