From e983c83d4eb3524c2a8aea0063d5ae2bf3874f0f Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 20 Sep 2021 02:13:22 -0300 Subject: [PATCH] [input] mask SIGTHR where defined #2191 --- src/lib/in.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/in.c b/src/lib/in.c index 6e011b945..d791aee7b 100644 --- a/src/lib/in.c +++ b/src/lib/in.c @@ -1882,6 +1882,11 @@ block_on_input(inputctx* ictx, unsigned* rtfd, unsigned* rifd){ sigfillset(&smask); sigdelset(&smask, SIGCONT); sigdelset(&smask, SIGWINCH); +#ifdef SIGTHR + // freebsd uses SIGTHR for thread cancellation; need this to ensure wakeup + // on exit (in cancel_and_join()). + sigdelset(&smask, SIGTHR); +#endif if(pfdcount == 0){ loginfo("output queues full; blocking on signals\n"); int signum;