Date: Wed, 22 Nov 2000 13:39:15 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: Matt Dillon <dillon@earth.backplane.com>, Robert Nordier <rnordier@nordier.com> Cc: dcs@newsguy.com (Daniel C. Sobral), hackers@FreeBSD.ORG Subject: Re: fclose vs ferror (from libc/getcap) Message-ID: <p04330108b641c13d6c49@[128.113.24.47]> In-Reply-To: <200011221736.eAMHaBK13156@earth.backplane.com> References: <200011221225.OAA04292@siri.nordier.com> <200011221736.eAMHaBK13156@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 9:36 AM -0800 11/22/00, Matt Dillon wrote: > [...] When you fclose() something or otherwise terminate a > structure, it's gone. Anything else is illegal. *internally* > our libc assumes that ferror() is legal after an fclose() > because, well, it's true... but only for internal library > functions. Nobody outside the library can legally make that > assumption and it could also be argued that even within the > library those types of assumptions should not be made unless > absolutely necessary. Hmm. That does bring up an important point. The code with the fclose/ferror combination *is* something I was taking directly out of libc. So, it would have more right than most code to make explicit assumptions about the implementation of other libc routines. I had not thought of it in that way, mainly because I pulled it out of libc at least five years ago, and it didn't cause me any trouble until this month. > There isn't much we can do about the issue except fix the > instances of mis-programming as they show up. Yep. Oh well. On to the next tempest, please pass the tea. -- --- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p04330108b641c13d6c49>