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 01:30 PM, Rich Felker wrote:
> I'm having a hard time seeing how a tape at EOF could come to have
> more data available.

That's longstanding standard behavior for tape devices.  Multiple
files reside on the tape, in sequence.  You read one file until EOF.
Then you read some more data, to get the next file.  You do this
without closing and reopening the file; you just issue a bunch of
read() calls -- when read() returns 0 that means you got an EOF.  The
last file is followed by two EOF markers instead of one.  This
behavior is no more fragile than anything else having to do with tape
(admittedly not my favorite device to deal with).


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