Mail Archives: djgpp-workers/2003/03/08/04:54:09
> Date: Fri, 7 Mar 2003 20:30:22 -0500
> From: DJ Delorie <dj AT delorie DOT com>
>
> In unix there is a difference between a tty and other character
> devices. In dos, I'm not sure we can really tell - there isn't enough
> information in the device bits to tell.
I think there are bits there that tell this. These are those two
bits which `isatty' currently uses.
Why do you think these bits are not enough?
> clock$ for example, probably
> isn't a "tty" per se, but in all the contexts I can think of where it
> makes sense to use isatty() in djgpp, clock$ is one of them.
Even if we couldn't find a single program where the distinction
between clock$ and a real terminal device would matter, I think it
still could make sense to make that distinction, simply because clock$
is not a terminal device.
> In the case of redirected stdout, for example, we still can't tell the
> difference between anything other than devices (stdout$, clock$, com1,
> null, etc) and files
Unless I misunderstand what you are saying, I think we _can_ tell the
difference: DOS knows the difference, and `isatty' and `stat'/`fstat'
tell us about it.
- Raw text -