According to the sysread documentation, mixed use of the unbuffered sysread() function with buffered I/O functions such as eof() will cause wierdness. Instead try checking the return value of sysread() to see if it is zero.
That did it.. 100% the problem.. thanks. In the past I had used read to accomplish the same task.. never realized eof was buffered. Incredibly interesting behavior though.
Thanks much.