Clear unwanted errno in patty_kiss_tnc_new_fd()
Clear unwanted errno in patty_kiss_tnc_new_fd() when isatty() returns false on a file descriptor
This commit is contained in:
parent
40408060de
commit
63a1c2d56e
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ patty_kiss_tnc *patty_kiss_tnc_new_fd(int fd) {
|
|||
if (tcflush(fd, TCIOFLUSH) < 0) {
|
||||
goto error_tcflush;
|
||||
}
|
||||
} else {
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
tnc->fd = fd;
|
||||
|
|
Loading…
Add table
Reference in a new issue