So it seems to think it has another line when processing ctrl-z from console stdin. I saw some comment in the eof() description about the possibility of having to seek past the end of file on non-seekable streams in order to detect the eof. This might be the case when detecting ctrl-z from console, right?