Add a session-exit notification

Closes #63
This commit is contained in:
Nicolas Viennot 2015-11-25 08:17:42 -05:00
parent 3be116bb6e
commit 8e246f6f98

View File

@ -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);