cbreak_mode: require working file descriptor

This commit is contained in:
nick black 2021-05-27 17:28:15 -04:00
parent ccad97dcff
commit 217ab0cd90
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -20,7 +20,7 @@ void sigwinch_handler(int signo){
}
int cbreak_mode(int ttyfd, const struct termios* tpreserved){
if(n->ttyfd < 0){
if(ttyfd < 0){
return 0;
}
// assume it's not a true terminal (e.g. we might be redirected to a file)