summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authornicm <nicm>2017-07-09 22:33:09 +0000
committernicm <nicm>2017-07-09 22:33:09 +0000
commit58b796608f3aca60f0abb21e2f96aa55ecb18ab3 (patch)
tree266b1b168620a41a82b32f5eb180b117ba1aaffa /session.c
parentbfaa885f10ec9da42cd3aeb7a3efa999073657fa (diff)
Some extra logging to show why tmux might exit.
Diffstat (limited to 'session.c')
-rw-r--r--session.c8
1 files changed, 4 insertions, 4 deletions
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);