summaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-27 06:19:48 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-27 06:19:48 +0100
commitceee3d82853a198884795e5d815b895468212b24 (patch)
tree2e40ab3dff86ae1ebf49d76db1716a8677b095ff /socket.c
parent2a987ee8c94ac29545e3c94d47b5d493daea0b5e (diff)
notify socket unit when service unit dies
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 1954259b50..86104aa85a 100644
--- a/socket.c
+++ b/socket.c
@@ -779,6 +779,17 @@ int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds) {
return 0;
}
+void socket_notify_service_dead(Socket *s) {
+ assert(s);
+
+ /* The service is dead. Dang. */
+
+ if (s->state == SOCKET_RUNNING) {
+ log_debug("%s got notified about service death.", unit_id(UNIT(s)));
+ socket_enter_listening(s);
+ }
+}
+
const UnitVTable socket_vtable = {
.suffix = ".socket",