}
static void
-sighandler(const int signo)
+terminate(const int signo)
{
- if (signo == SIGTERM || signo == SIGINT) {
- done = 1;
- }
+ done = 1;
}
static void
}
memset(&act, 0, sizeof(act));
- act.sa_handler = sighandler;
- sigaction(SIGINT, &act, 0);
- sigaction(SIGTERM, &act, 0);
+ act.sa_handler = terminate;
+ sigaction(SIGINT, &act, NULL);
+ sigaction(SIGTERM, &act, NULL);
if (!sflag) {
dpy = XOpenDisplay(NULL);