If a client is killed while suspended with ^Z so has gone through the
authornicm <nicm@openbsd.org>
Sun, 13 Jul 2014 20:23:10 +0000 (20:23 +0000)
committernicm <nicm@openbsd.org>
Sun, 13 Jul 2014 20:23:10 +0000 (20:23 +0000)
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.

usr.bin/tmux/server-client.c

index 73e061a..856df3d 100644 (file)
@@ -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)