Fix: handle EOF on Linux.