From c0f432f99b5fc11e989ad3028cc1f5c0d60bd074 Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 17 Sep 2021 19:08:48 -0400 Subject: [PATCH] setup_signals: block SIGWINCH/SIGCONT for the calling thread #2175 --- src/lib/signal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/signal.c b/src/lib/signal.c index af6c996c4..303e6619f 100644 --- a/src/lib/signal.c +++ b/src/lib/signal.c @@ -171,6 +171,9 @@ int setup_signals(void* vnc, bool no_quit_sigs, bool no_winch_sigs, fprintf(stderr, "Error installing term signal handler (%s)\n", strerror(errno)); return -1; } + // we're not going to be restoring the old mask at exit, as who knows, + // they might have masked more things afterwards. + pthread_sigmask(SIG_BLOCK, &sa.sa_mask, NULL); handling_winch = true; } if(!no_quit_sigs){