Browse Source

Raise the original signal on exiting signal handler in ckpmsg

master
Con Kolivas 8 years ago
parent
commit
a8cdc4470a
  1. 7
      src/ckpmsg.c

7
src/ckpmsg.c

@ -97,12 +97,15 @@ static struct option long_options[] = {
struct termios oldctrl;
static void sighandler(const int __maybe_unused sig)
static void sighandler(const int sig)
{
/* Return console to its previous state */
tcsetattr(STDIN_FILENO, TCSANOW, &oldctrl);
exit(0);
if (sig) {
signal (sig, SIG_DFL);
raise (sig);
}
}
int get_line(char **buf)

Loading…
Cancel
Save