From: nicm Date: Sun, 13 Jul 2014 20:23:10 +0000 (+0000) Subject: If a client is killed while suspended with ^Z so has gone through the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9d03e48ee3938f877010f2beffb64db60ba97f2f;p=openbsd 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. --- 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 @@ -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)