Skip to content

Commit

Permalink
replace sigint() with SIG_DFL
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Jul 15, 2021
1 parent 1a95f2d commit ee75c91
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/stty.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
#include "stty.h" /*(setTty) */
#include "defs.h"
/* stty -icannon -echo -isig -icrnl -inlcr */
static void
sigint (int i)
{
_exit (1);
}

static int pid;
static struct termios oldTermios;
Expand All @@ -37,8 +32,8 @@ setTty (void)
if (!isatty (0))
return;
pid = getpid ();
signal (SIGTERM, sigint);
signal (SIGINT, sigint);
signal (SIGTERM, SIG_DFL);
signal (SIGINT, SIG_DFL);
tcgetattr (0, &t);
oldTermios = t;
atexit (recoverTermios);
Expand Down

0 comments on commit ee75c91

Please sign in to comment.