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

George Robbins grr at cbmvax.UUCP
Thu May 25 13:21:48 AEST 1989


In article <2721 at helios.ee.lbl.gov> envbvs at epb2.lbl.gov (Brian V. Smith) writes:
> 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.

		And the tape is repositioned after the first of
		the two tape marks...
 
> 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.

	No, the bug is most likely that the Ultrix driver *is* playing
	the sticky EOF game.  If the program closed/opened the input file
	it would probably work fine, though the man pages imply this is
	not necessary.
-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr at uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)



More information about the Comp.unix.wizards mailing list