Fix EOF overload when stdin is /dev/null