read(2) won't move TK50 past tape file mark

Brian V. Smith envbvs at epb2.lbl.gov
Thu May 25 07:45:57 AEST 1989


According to the manual entry for mtio(4) on Ultrix 3.0
(quoted w/o permission):

     ... 
     done with a tape ioctl call.  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. When a file open for
     writing is closed, two end-of-files (EOF) are written.

Therefore, you could expect to get 0 bytes read for two reads 
(because of two possible EOF's on the tape), but after that it should 
read the next file.
I haven't tried it on our machines, but it looks like what you have 
run into is a real bug.

Brian Smith
Lawrence Berkeley Laboratory
bvsmith at lbl.gov



More information about the Comp.unix.wizards mailing list