check return value of sighandler

master
Alessandro Mauri 4 years ago
parent 29bc56fc36
commit eb8eec916f
  1. 10
      hkd.c

10
hkd.c

@ -175,9 +175,13 @@ int main (int argc, char *argv[])
dead = 0; dead = 0;
memset(&action, 0, sizeof(action)); memset(&action, 0, sizeof(action));
action.sa_handler = int_handler; action.sa_handler = int_handler;
sigaction(SIGINT, &action, NULL);
sigaction(SIGUSR1, &action, NULL); if (sigaction(SIGINT, &action, NULL) == -1)
sigaction(SIGCHLD, &action, NULL); die(wrap_err("Error setting interrupt handler:"));
if (sigaction(SIGUSR1, &action, NULL) == -1)
die(wrap_err("Error setting interrupt handler:"));
if (sigaction(SIGCHLD, &action, NULL) == -1)
die(wrap_err("Error setting interrupt handler:"));
/* Parse config file */ /* Parse config file */
parse_config_file(); parse_config_file();

Loading…
Cancel
Save