diff options
author | 2020-10-30 18:54:23 +0000 | |
---|---|---|
committer | 2020-10-30 18:54:23 +0000 | |
commit | b18d267915efc6434ca960680437bdb250cd05e0 (patch) | |
tree | 9db935696afbe1a2ab7ecf5207bdca9a90ef90cf /usr.bin/tmux/server-client.c | |
parent | Track creation time of address proposals to be able to establish total (diff) | |
download | wireguard-openbsd-b18d267915efc6434ca960680437bdb250cd05e0.tar.xz wireguard-openbsd-b18d267915efc6434ca960680437bdb250cd05e0.zip |
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 'usr.bin/tmux/server-client.c')
-rw-r--r-- | usr.bin/tmux/server-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 2758229e50c..e94f9c5f341 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.364 2020/10/30 09:00:07 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.365 2020/10/30 18:54:23 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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; |