diff --git a/src/lib/fd.c b/src/lib/fd.c index 255447e9c..ecb554c4e 100644 --- a/src/lib/fd.c +++ b/src/lib/fd.c @@ -472,7 +472,7 @@ int get_tty_fd(FILE* ttyfp){ if((fd = fileno(ttyfp)) < 0){ logwarn("No file descriptor was available in outfp %p\n", ttyfp); }else{ - if(isatty(fd)){ + if(tty_check(fd)){ fd = dup(fd); }else{ loginfo("fd %d not a TTY\n", fd); @@ -485,7 +485,7 @@ int get_tty_fd(FILE* ttyfp){ if(fd < 0){ loginfo("Error opening /dev/tty (%s)\n", strerror(errno)); }else{ - if(!isatty(fd)){ + if(!tty_check(fd)){ loginfo("File descriptor for /dev/tty (%d) is not actually a TTY\n", fd); close(fd); fd = -1;