This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BZ #1190: stream behaviour on encountering an EOF


On 09/13/2012 12:37 PM, Rich Felker wrote:

> A socket does not return EOF except when the other end was closed or
> shutdown.

True, I missed that.

> I'm not sure if there are device-related cases,

There are.  Tape devices work that way.  I don't suggest using stdio
on tape devices, but not everyone follows my suggestions....

> You identified one technical reason (growing regular files)

Terminals count too, surely.  They're probably more important than
growing regular files.

And the issue can come up regardless of file type.  If the underlying
file descriptor is closed and reopened, for example, a sticky-EOF
fgetc will still report EOF; a nonsticky one won't.  It's true that
applications aren't supposed to do that sort of thing, but some do
anyway -- I've done it myself.

> the whole sentiment against fixing it seems to be
> non-technical and borderline cargo-culting.

Again, injecting politics here is not likely to help, so let's try to
keep the discussion technical.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]