aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-10 15:22:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-11 17:55:30 +0000
commit34699ad3b2141bf883be8205e49b3b9ff82ca7ab (patch)
tree6fd54b1103bd1bc95ebea237cbb6d27ff42c4cbd
parentmain: monitor SIGINT+SIGTERM using the FDM (diff)
render: block all signals in the rendering threads
-rw-r--r--render.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/render.c b/render.c
index 026f176f..58a93a33 100644
--- a/render.c
+++ b/render.c
@@ -3,6 +3,7 @@
#include <string.h>
#include <wctype.h>
#include <unistd.h>
+#include <signal.h>
#include <sys/ioctl.h>
#include <sys/time.h>
@@ -1265,6 +1266,10 @@ render_worker_thread(void *_ctx)
const int my_id = ctx->my_id;
free(ctx);
+ sigset_t mask;
+ sigfillset(&mask);
+ pthread_sigmask(SIG_SETMASK, &mask, NULL);
+
char proc_title[16];
snprintf(proc_title, sizeof(proc_title), "foot:render:%d", my_id);