[libc] handle case where /dev/tty doesn't exist
authorMichael Jones <michaelrj@google.com>
Mon, 10 Oct 2022 22:39:38 +0000 (15:39 -0700)
committerMichael Jones <michaelrj@google.com>
Mon, 10 Oct 2022 22:40:52 +0000 (15:40 -0700)
commit707996e486df11db0ff28695e75a2375db20030c
treeb169d023922afa137a63badba7d6df14e0900acc
parentb8e71766c835603b6353827dc54939e1740f4867
[libc] handle case where /dev/tty doesn't exist

In the isatty test it was assumed that /dev/tty existed, but that's not
always the case. Now we check for that.

Differential Revision: https://reviews.llvm.org/D135626
libc/test/src/unistd/isatty_test.cpp