summaryrefslogtreecommitdiff
path: root/src/socket.h
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-03-05 22:47:54 +0100
committerMichal Schmidt <mschmidt@redhat.com>2012-03-05 22:47:54 +0100
commitc2f3480897b51dd9b2137f1eeddb4c851e9c6e3b (patch)
tree0b67acba3f0705b4e78c1d1643785ea6b223d56d /src/socket.h
parent82bdec0d65e38333286ae025e5d1aae29b8463f5 (diff)
socket: fail the socket if the service keeps dying on start
If the service reaches the start limit, mark the sockets that activate it as failed (with the result code 'service-broken'). This way the sockets won't act as tarpits for clients connecting to them.
Diffstat (limited to 'src/socket.h')
-rw-r--r--src/socket.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socket.h b/src/socket.h
index d242796a31..1f4f23c964 100644
--- a/src/socket.h
+++ b/src/socket.h
@@ -72,6 +72,7 @@ typedef enum SocketResult {
SOCKET_FAILURE_EXIT_CODE,
SOCKET_FAILURE_SIGNAL,
SOCKET_FAILURE_CORE_DUMP,
+ SOCKET_FAILURE_SERVICE_BROKEN,
_SOCKET_RESULT_MAX,
_SOCKET_RESULT_INVALID = -1
} SocketResult;
@@ -148,7 +149,7 @@ struct Socket {
int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds);
/* Called from the service when it shut down */
-void socket_notify_service_dead(Socket *s);
+void socket_notify_service_dead(Socket *s, bool broken);
/* Called from the mount code figure out if a mount is a dependency of
* any of the sockets of this socket */