The isatty system call currently returns ENOTTY even when fd is not a valid file descriptor. It should be returning EBADF in this case (although I doubt any programs really care).
This should be an easy fix by just returning whatever error is returned by ioctl instead of returning ENOTTY unconditionally when the TIOCGWINSZ fails.
I can take this one if you can assign me to the issue :)
The
isattysystem call currently returnsENOTTYeven whenfdis not a valid file descriptor. It should be returningEBADFin this case (although I doubt any programs really care).This should be an easy fix by just returning whatever error is returned by
ioctlinstead of returningENOTTYunconditionally when theTIOCGWINSZfails.I can take this one if you can assign me to the issue :)