scriptreplay: enable special character handling

Calling cfmakeraw disables terminal special character handling. For
example, Ctrl-C does not send SIGINT to scriptreplay. The following
fixes this.

 tattr.c_lflag |= ISIG;

where tattr is the struct termios with which we are working.
This commit is contained in:
Soumendra Ganguly 2020-07-17 04:54:30 -05:00 committed by Karel Zak
parent b725361adf
commit 00a09d78ea
1 changed files with 1 additions and 0 deletions

View File

@ -130,6 +130,7 @@ static int termraw(struct termios *backup)
tattr = *backup;
cfmakeraw(&tattr);
tattr.c_lflag |= ISIG;
if (tcsetattr(STDOUT_FILENO, TCSANOW, &tattr) != 0)
return -1;