Matt Dillon wrote:
>
> [...]
>
> In today's world the standard is: When you free() something, that's it..
> it's gone. 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.
>
> There isn't much we can do about the issue except fix the instances
> of mis-programming as they show up.
An excellent summary of what is and what should be.
If we wanted to be anally retentive, we could bzero the FILE after completing
the close() operation, just to "help" poorly written programs core...
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC
[EMAIL PROTECTED] http://softweyr.com/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message