stdin/stdout/stderr streams if it's part of the thread-safe library.
- fpathconf() now checks if the file descriptor is really referring to a file.
- The termios hook entry code could file descriptor's embedded file handle
rather than what the thread safe library had dynamically bound to the
stdin/stdout/stderr streams.