From: nicm Date: Thu, 28 Oct 2021 18:54:33 +0000 (+0000) Subject: Allow detach even if suspend flag set, GitHub issue 2932. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d1c9358d49fe4aa7cda86de959b74be4f3bcecde;p=openbsd Allow detach even if suspend flag set, GitHub issue 2932. --- diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 8e372fd8d18..7879ce5606d 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.388 2021/10/11 13:27:50 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.389 2021/10/28 18:54:33 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -516,7 +516,7 @@ server_client_detach(struct client *c, enum msgtype msgtype) { struct session *s = c->session; - if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS)) + if (s == NULL || (c->flags & CLIENT_NODETACHFLAGS)) return; c->flags |= CLIENT_EXIT; diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 8929f5de99a..9c663077c57 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.1151 2021/10/26 12:22:23 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.1152 2021/10/28 18:54:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1710,6 +1710,9 @@ struct client { (CLIENT_DEAD| \ CLIENT_SUSPENDED| \ CLIENT_EXIT) +#define CLIENT_NODETACHFLAGS \ + (CLIENT_DEAD| \ + CLIENT_EXIT) #define CLIENT_NOSIZEFLAGS \ (CLIENT_DEAD| \ CLIENT_SUSPENDED| \