Date: Fri, 7 Mar 2003 20:30:22 -0500 Message-Id: <200303080130.h281UMb24534@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT delorie DOT com using -f From: DJ Delorie To: djgpp-workers AT delorie DOT com CC: djgpp-workers AT delorie DOT com In-reply-to: <3E69434C.B420FA9D@phekda.freeserve.co.uk> (message from Richard Dawe on Sat, 08 Mar 2003 01:11:40 +0000) 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> 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 > I thought we were talking about how to detect TTYs that have been > redirected (aka piped), so that we can fail pwrite and set errno == > ESPIPE. > I see what you mean. Are all character devices TTYs? Or is that an > oxymoronic question? 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. 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. 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 (including pipes to other programs, which we fake). So while I think the question is meaningful, I also think it's moot.