From 58b796608f3aca60f0abb21e2f96aa55ecb18ab3 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 9 Jul 2017 22:33:09 +0000 Subject: Some extra logging to show why tmux might exit. --- session.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'session.c') diff --git a/session.c b/session.c index 9fa76dc3..a675ae3d 100644 --- a/session.c +++ b/session.c @@ -178,7 +178,7 @@ session_create(const char *prefix, const char *name, int argc, char **argv, if (argc >= 0) { wl = session_new(s, NULL, argc, argv, path, cwd, idx, cause); if (wl == NULL) { - session_destroy(s); + session_destroy(s, __func__); return (NULL); } session_select(s, RB_ROOT(&s->windows)->idx); @@ -229,11 +229,11 @@ session_free(__unused int fd, __unused short events, void *arg) /* Destroy a session. */ void -session_destroy(struct session *s) +session_destroy(struct session *s, const char *from) { struct winlink *wl; - log_debug("session %s destroyed", s->name); + log_debug("session %s destroyed (%s)", s->name, from); s->curw = NULL; RB_REMOVE(sessions, &sessions, s); @@ -419,7 +419,7 @@ session_detach(struct session *s, struct winlink *wl) session_group_synchronize_from(s); if (RB_EMPTY(&s->windows)) { - session_destroy(s); + session_destroy(s, __func__); return (1); } return (0); -- cgit v1.2.3