Date: Sat, 08 Mar 2003 11:46:57 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: dj AT delorie DOT com Message-Id: <8361-Sat08Mar2003114656+0200-eliz@elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <200303080130.h281UMb24534@envy.delorie.com> (message from DJ Delorie on Fri, 7 Mar 2003 20:30:22 -0500) Subject: Re: New POSIX: pwrite [PATCH] References: <200303071845 DOT h27Ij5d18334 AT envy DOT delorie DOT com> <3E6938EC DOT D9BFE2E4 AT phekda DOT freeserve DOT co DOT uk> <200303080038 DOT h280crk23683 AT envy DOT delorie DOT com> <3E69434C DOT B420FA9D AT phekda DOT freeserve DOT co DOT uk> <200303080130 DOT h281UMb24534 AT envy DOT delorie DOT com> Reply-To: Eli Zaretskii Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Fri, 7 Mar 2003 20:30:22 -0500 > From: DJ Delorie > > 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.