diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-07-13 20:23:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-07-13 20:23:11 +0000 |
commit | 608d88a44abb07578b2df24351d37e46631654af (patch) | |
tree | ce0ee192e8f3fc4ca8d2b38c39a67041d6448373 /usr.bin | |
parent | 25e6eb33ca2ff13c24082cbb4ad7e962430eebed (diff) |
If a client is killed while suspended with ^Z so has gone through the
MSG_EXITED dance, don't try to resume it since a) it's pointless and b)
the tty structures have been cleaned up and tmux will crash.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/server-client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 73e061a1e80..856df3d3d1a 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.120 2014/04/16 08:02:31 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.121 2014/07/13 20:23:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -875,6 +875,9 @@ server_client_msg_dispatch(struct client *c) break; c->flags &= ~CLIENT_SUSPENDED; + if (c->tty.fd == -1) /* exited in the meantime */ + break; + if (gettimeofday(&c->activity_time, NULL) != 0) fatal("gettimeofday"); if (c->session != NULL) |