Remove old gt.info

This commit is contained in:
Adrien Gallouët
2016-12-20 10:24:20 +00:00
parent 04f7c20494
commit dc295f9dc0

View File

@@ -26,7 +26,6 @@
static struct { static struct {
volatile sig_atomic_t quit; volatile sig_atomic_t quit;
volatile sig_atomic_t info;
int timeout; int timeout;
} gt; } gt;
@@ -50,18 +49,9 @@ fd_set_nonblock(int fd)
} }
static void static void
gt_sa_handler(int sig) gt_quit_handler(int sig)
{ {
switch (sig) { gt.quit = 1;
case SIGINT:
case SIGQUIT:
case SIGTERM:
gt.quit = 1;
break;
case SIGUSR1:
gt.info = 1;
break;
}
} }
static void static void
@@ -73,15 +63,15 @@ gt_set_signal(void)
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sa.sa_handler = gt_sa_handler; sa.sa_handler = gt_quit_handler;
sigaction(SIGINT, &sa, NULL); sigaction(SIGINT, &sa, NULL);
sigaction(SIGQUIT, &sa, NULL); sigaction(SIGQUIT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL); sigaction(SIGTERM, &sa, NULL);
sigaction(SIGUSR1, &sa, NULL);
sa.sa_handler = SIG_IGN; sa.sa_handler = SIG_IGN;
sigaction(SIGHUP, &sa, NULL); sigaction(SIGHUP, &sa, NULL);
sigaction(SIGPIPE, &sa, NULL); sigaction(SIGPIPE, &sa, NULL);
sigaction(SIGUSR1, &sa, NULL);
} }
static void static void