fix fd assignment on tty close
This commit is contained in:
parent
604665ee05
commit
5707b9e4e0
1 changed files with 2 additions and 2 deletions
4
tty.c
4
tty.c
|
@ -66,8 +66,8 @@ int tty_close(struct tty_t *tty_dev) {
|
||||||
|
|
||||||
fprintf(stderr, "[%s] closing tty device \n", __func__);
|
fprintf(stderr, "[%s] closing tty device \n", __func__);
|
||||||
|
|
||||||
if (tcsetattr(tty_dev->fd, TCSANOW, &(tty_dev->ttysetdef)) < 0) {
|
if (tcsetattr(fd, TCSANOW, &(tty_dev->ttysetdef)) < 0) {
|
||||||
fprintf(stderr, "[%s] error restorting tty device default config\n", __func__);
|
fprintf(stderr, "[%s] error restoring tty device default config\n", __func__);
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue