mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
Fix incorrect check for error of tcsetattr()
Prior to this commit, the code was incorrectly checking whether tcsetattr() succeeded or not: The condition (err == -1 && err == EINTR) is always false.
This commit is contained in:
parent
d8cc0b0465
commit
be0978f229
@ -715,7 +715,7 @@ static int set_disp_mode(int fd, int option) {
|
||||
else
|
||||
term.c_lflag &= ~ECHOFLAGS;
|
||||
err = tcsetattr(fd, TCSAFLUSH, &term);
|
||||
if (err == -1 && err == EINTR) {
|
||||
if (err == -1) {
|
||||
perror("Cannot set the attribution of the terminal");
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user