commit 344014a6c39494462852d0cc0dfa2a9f86809124
Author: Aaron Marcher <[email protected]>
AuthorDate: Mon Nov 30 19:13:11 2020 +0100
Commit: Aaron Marcher <[email protected]>
CommitDate: Mon Nov 30 19:13:48 2020 +0100
Follow-up to e682d740adb7bb36b9faca1ca1cc54b7c5448e6c
Additions for "Handle SIGUSR1 for forced refreshes"
diff --git a/slstatus.c b/slstatus.c
index 9edbdd6..64da5cb 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -18,7 +18,7 @@ struct arg {
};
char buf[1024];
-static int done;
+static volatile sig_atomic_t done;
static Display *dpy;
#include "config.h"
@@ -74,6 +74,7 @@ main(int argc, char *argv[])
act.sa_handler = terminate;
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
+ act.sa_flags |= SA_RESTART;
sigaction(SIGUSR1, &act, NULL);
if (!sflag && !(dpy = XOpenDisplay(NULL))) {