Clear sa_mask and sa_handler before calling sigaction().

This commit is contained in:
Chris Spiegel 2015-01-31 22:51:11 -08:00
parent 2c151a0d1b
commit fb3762ee97

2
main.c
View file

@ -434,6 +434,8 @@ int main(int argc, char *argv[])
if (STDIN)
control->inFILE = stdin;
/* Implement signal handler only once flags are set */
sigemptyset(&handler.sa_mask);
handler.sa_flags = 0;
handler.sa_handler = &sighandler;
sigaction(SIGTERM, &handler, 0);
sigaction(SIGINT, &handler, 0);