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

Jeffrey W Percival jwp at larry.sal.wisc.edu
Wed May 24 09:18:54 AEST 1989


I have a TK50 tape with 3 80-byte records followed by a tape file mark,
which is in turn followed by many 8192-byte records.  I wrote a little
C program that does a read(2) in a tight loop, and reports the number
of bytes read.    We expect this:

	80 bytes read
	80 bytes read
	80 bytes read
	0 bytes read
	8192 bytes read
	8192 bytes read
	...

Right?  We get this output on a VS2000 with Ultrix 2.2, and a VS2000
with Ultrix 3.0.  However, on 2 of our MicroVAX II's running Ultrix 3.0,
we see this:

	80 bytes read
	80 bytes read
	80 bytes read
	0 bytes read
	0 bytes read
	0 bytes read
	0 bytes read
	0 bytes read
	0 bytes read
	0 bytes read
	0 bytes read
	...

It looks like the read(2) is not getting past the file mark.  This
could be a problem in the C routine read(2), the Ultrix system, or
in the TK50 controller.  Has anyone seen this, or know what's going on?
-- 
Jeff Percival (jwp at larry.sal.wisc.edu)



More information about the Comp.unix.wizards mailing list