From 95841ba16acafa8c1a516712ad0f2b48e34357e6 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 30 Oct 2020 18:54:23 +0000 Subject: With csh, a tmux client gets SIGTERM before SIGCONT when killed with "kill %%", so when the client tells the server it got SIGCONT, don't use bits that may already have been freed when it got SIGTERM. Also don't print anything on exit if we get SIGTERM while suspended. Reported by Theo. --- server-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 190897ff..3e256a92 100644 --- a/server-client.c +++ b/server-client.c @@ -2025,7 +2025,7 @@ server_client_dispatch(struct imsg *imsg, void *arg) break; c->flags &= ~CLIENT_SUSPENDED; - if (c->fd == -1) /* exited in the meantime */ + if (c->fd == -1 || c->session == NULL) /* exited already */ break; s = c->session; -- cgit