]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
scriptreplay: enable special character handling
authorSoumendra Ganguly <soumendraganguly@gmail.com>
Fri, 17 Jul 2020 09:54:30 +0000 (04:54 -0500)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Jul 2020 10:23:56 +0000 (12:23 +0200)
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.

term-utils/scriptreplay.c

index 19a7d568b41057b04cd5ca832f841ae0ea9d2973..99edcaf8d60938828f241826c46a323131d40deb 100644 (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;