From 566442a0c023b2f07b9ade411d54870998564641 Mon Sep 17 00:00:00 2001 From: nikolaus Date: Wed, 7 Sep 2022 13:59:22 +0200 Subject: Initial commit and full program. --- dwmblocks.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) mode change 100644 => 100755 dwmblocks.c (limited to 'dwmblocks.c') diff --git a/dwmblocks.c b/dwmblocks.c old mode 100644 new mode 100755 index befd252..08f0b59 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -8,7 +8,7 @@ #endif #ifdef __OpenBSD__ #define SIGPLUS SIGUSR1+1 -#define SIGMINUS SIGUSR1-1 +#define SIGMINUS SIGINFO #else #define SIGPLUS SIGRTMIN #define SIGMINUS SIGRTMIN @@ -104,8 +104,12 @@ void setupsignals() { #ifndef __OpenBSD__ /* initialize all real time signals with dummy handler */ - for (int i = SIGRTMIN; i <= SIGRTMAX; i++) - signal(i, dummysighandler); +/* for (int i = SIGRTMIN; i <= SIGRTMAX; i++) */ +/* signal(i, dummysighandler); */ + for (unsigned int i = 0; i < LENGTH(blocks); i++) { + if (blocks[i].signal > 0) + signal(SIGRTMIN+blocks[i].signal, sighandler); + } #endif for (unsigned int i = 0; i < LENGTH(blocks); i++) { -- cgit v1.2.1