summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2020-10-30 18:54:23 +0000
committernicm <nicm>2020-10-30 18:54:23 +0000
commit95841ba16acafa8c1a516712ad0f2b48e34357e6 (patch)
tree6bf01605a4b1f6c4e97ed17ca8fea84d5580ca84 /server-client.c
parent9726c4454e29cb5b9c6681abfb5c99972a9bd574 (diff)
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.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c2
1 files changed, 1 insertions, 1 deletions
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;