delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/03/02/00:01:17

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10303020302.AA17358@clio.rice.edu>
Subject: Re: Some tidy-ups after the changes to isatty [PATCH]
To: djgpp-workers AT delorie DOT com
Date: Sat, 1 Mar 2003 21:02:47 -0600 (CST)
In-Reply-To: <E18pBAO-0000nu-00@phekda.freeserve.co.uk> from "Richard Dawe" at Mar 01, 2003 05:55:46 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> * Document the new behaviour on the isatty info page.
> 
> * Some code assumed isatty(fd) != 0 indicated that fd was a terminal.
>   Fix these cases.

Does POSIX really say that a bad file handle should return -1?  If so,
this is inconsistent with every implementation I've ever seen (Turbo C,
old DJGPP, AIX, Solaris, HP/UX).  Even our example is wrong (which isn't
fixed with this patch).  All of the other implementations say it will
return 0 and set errno() if something was wrong.  Scary.  Just look
at all the places in the libc which need changing.  Admittedly a bad
handle should be rare, but...

> One question: Should I have added a DJ-style copyright comment
> to src/libc/go32/dpmiexcp.c?

I've assigned the copyright for this usage to DJ, so whatever he wants.
It appears the "freely distributed" was really true, I've been informed
twice it was borrowed to build signal handling for other extenders :-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019