Change tcgetattr error handling.
This commit is contained in:
parent
fbc9b69151
commit
535e81ebba
|
@ -128,9 +128,8 @@ setterm(struct termios *backup)
|
|||
struct termios tattr;
|
||||
|
||||
if (tcgetattr(STDOUT_FILENO, backup) != 0) {
|
||||
if (errno == EBADF)
|
||||
err(EXIT_FAILURE, _("%d not valid fd"), STDOUT_FILENO);
|
||||
/* errno == ENOTTY */
|
||||
if (errno != ENOTTY) /* For debugger. */
|
||||
err(EXIT_FAILURE, _("unexpected tcgetattr failure"));
|
||||
return 0;
|
||||
}
|
||||
tattr = *backup;
|
||||
|
|
Loading…
Reference in New Issue