From: Wayne Davison Date: Fri, 6 Jan 2006 22:20:07 +0000 (+0000) Subject: We need to call clearerr() when getc() returns EOF with errno == EINTR. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/61e16468f0c7a2186b1ef8ca3393e292ba1b1a97 We need to call clearerr() when getc() returns EOF with errno == EINTR. --- diff --git a/exclude.c b/exclude.c index 35a64b96..8d748641 100644 --- a/exclude.c +++ b/exclude.c @@ -1006,8 +1006,10 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname, int ch, overflow = 0; while (1) { if ((ch = getc(fp)) == EOF) { - if (ferror(fp) && errno == EINTR) + if (ferror(fp) && errno == EINTR) { + clearerr(fp); continue; + } break; } if (word_split && isspace(ch))