From 8e246f6f98dd204b4d87651ca98cca8ef91562b1 Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Wed, 25 Nov 2015 08:17:42 -0500 Subject: [PATCH] Add a session-exit notification Closes #63 --- session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/session.c b/session.c index 25bcdf11..1e63a8f0 100644 --- a/session.c +++ b/session.c @@ -153,6 +153,8 @@ session_create(const char *name, const char *cmd, const char *cwd, return (s); } +extern void signal_waiting_clients(const char *name); + /* Destroy a session. */ void session_destroy(struct session *s) @@ -163,6 +165,8 @@ session_destroy(struct session *s) RB_REMOVE(sessions, &sessions, s); notify_session_closed(s); + signal_waiting_clients("session-exit"); + free(s->tio); session_group_remove(s);