Do not use errno when pread() returns 0