diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-07-10 00:01:15 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-07-10 00:01:15 +0100 |
commit | fbbf5a108b01c742ca11e779845a4d19a1c5edd1 (patch) | |
tree | 30ca3f8be7bd4ff8638ce44acd9540cfa0d5babc | |
parent | 05062e7d2d59a4e88c25d1d1a0b71ca97d74f8a3 (diff) | |
parent | 58b796608f3aca60f0abb21e2f96aa55ecb18ab3 (diff) | |
download | rtmux-fbbf5a108b01c742ca11e779845a4d19a1c5edd1.tar.gz rtmux-fbbf5a108b01c742ca11e779845a4d19a1c5edd1.tar.bz2 rtmux-fbbf5a108b01c742ca11e779845a4d19a1c5edd1.zip |
Merge branch 'obsd-master'
-rw-r--r-- | cmd-kill-session.c | 4 | ||||
-rw-r--r-- | server-fn.c | 4 | ||||
-rw-r--r-- | server.c | 3 | ||||
-rw-r--r-- | session.c | 8 | ||||
-rw-r--r-- | tmux.h | 2 |
5 files changed, 11 insertions, 10 deletions
diff --git a/cmd-kill-session.c b/cmd-kill-session.c index 87ab8a0a..00ea7789 100644 --- a/cmd-kill-session.c +++ b/cmd-kill-session.c @@ -61,12 +61,12 @@ cmd_kill_session_exec(struct cmd *self, struct cmdq_item *item) RB_FOREACH_SAFE(sloop, sessions, &sessions, stmp) { if (sloop != s) { server_destroy_session(sloop); - session_destroy(sloop); + session_destroy(sloop, __func__); } } } else { server_destroy_session(s); - session_destroy(s); + session_destroy(s, __func__); } return (CMD_RETURN_NORMAL); } diff --git a/server-fn.c b/server-fn.c index 5b1af13e..1b72a551 100644 --- a/server-fn.c +++ b/server-fn.c @@ -334,7 +334,7 @@ server_destroy_session_group(struct session *s) else { TAILQ_FOREACH_SAFE(s, &sg->sessions, gentry, s1) { server_destroy_session(s); - session_destroy(s); + session_destroy(s, __func__); } } } @@ -400,7 +400,7 @@ server_check_unattached(void) if (!(s->flags & SESSION_UNATTACHED)) continue; if (options_get_number (s->options, "destroy-unattached")) - session_destroy(s); + session_destroy(s, __func__); } } @@ -248,7 +248,7 @@ server_send_exit(void) } RB_FOREACH_SAFE(s, sessions, &sessions, s1) - session_destroy(s); + session_destroy(s, __func__); } /* Update socket execute permissions based on whether sessions are attached. */ @@ -346,6 +346,7 @@ server_signal(int sig) { int fd; + log_debug("%s: %s", __func__, strsignal(sig)); switch (sig) { case SIGTERM: server_exit = 1; @@ -177,7 +177,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); @@ -228,11 +228,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); @@ -418,7 +418,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); @@ -2299,7 +2299,7 @@ struct session *session_find_by_id(u_int); struct session *session_create(const char *, const char *, int, char **, const char *, const char *, struct environ *, struct termios *, int, u_int, u_int, char **); -void session_destroy(struct session *); +void session_destroy(struct session *, const char *); void session_add_ref(struct session *, const char *); void session_remove_ref(struct session *, const char *); int session_check_name(const char *); |