diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-27 06:19:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-27 06:19:48 +0100 |
commit | ceee3d82853a198884795e5d815b895468212b24 (patch) | |
tree | 2e40ab3dff86ae1ebf49d76db1716a8677b095ff /socket.c | |
parent | 2a987ee8c94ac29545e3c94d47b5d493daea0b5e (diff) |
notify socket unit when service unit dies
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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", |