Tape EOF processing

Keith Pyle keith at sequoia.UUCP
Thu May 4 06:37:03 AEST 1989


I have encountered the following problem under Ultrix-32 V3.0 (Rev 64):
when reading from a tape (either TK50 or TK70, I haven't checked 9 track),
the end of file processing is incorrect.  Quoting from TFM for mtio(4):

>                                A zero byte count is returned
>    when a tape mark is read, but another read will fetch the
>    first record of the next tape file.

What I have found is that when an EOF is encountered, all subsequent
calls to read(2) will return 0.  The only way to clear this condition
that I have found thus far is to close(2) the file and open(2) it
again.  (This assumes the use of the no-rewind device.)

The exact same code functions as expected and as per the documentation
under SunOS 4.0.1 and Sequent's DYNIX V3.0.12.  Is this a known problem
with Ultrix?  Is there a peculiar, strange, or warped reason for this
behavior (other than "It's a bug")?  If not a bug, is there a method,
other than the one I've discovered, to clear the condition to permit
the next read(2) to succeed as the manual says it should in the first
place?  Are we having fun yet?

-- 
-----------------------------------------------------------------------------
Keith Pyle                                      ...!cs.utexas.edu!execu!keith
Execucom Systems Corp., Austin, Texas

Disclaimer: What??  You actually believed me?
-----------------------------------------------------------------------------



More information about the Comp.unix.ultrix mailing list