We need to call clearerr() when getc() returns EOF with errno == EINTR.