As ianf said, EOF when reading from device is a Linux based issue due to communication with your board.
See the KB article below: