Exit on SIGHUP before attach also, GitHub issue 3084.
authornicm <nicm@openbsd.org>
Mon, 28 Feb 2022 09:34:57 +0000 (09:34 +0000)
committernicm <nicm@openbsd.org>
Mon, 28 Feb 2022 09:34:57 +0000 (09:34 +0000)
usr.bin/tmux/client.c

index fb95629..31218d6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.156 2021/08/27 17:25:55 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.157 2022/02/28 09:34:57 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -530,7 +530,7 @@ client_signal(int sig)
        if (sig == SIGCHLD)
                waitpid(WAIT_ANY, &status, WNOHANG);
        else if (!client_attached) {
-               if (sig == SIGTERM)
+               if (sig == SIGTERM || sig == SIGHUP)
                        proc_exit(client_proc);
        } else {
                switch (sig) {