mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
safe_fgets() - even more anal fgets()
This is from Linus -- the previous round forgot to clear error after EINTR case. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
da93d12b00
commit
687dd75c95
|
@ -915,9 +915,10 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
if (!ferror(stdin))
|
||||
die("fgets returned NULL, not EOF, not error!");
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
die("fgets: %s", strerror(errno));
|
||||
if (errno != EINTR)
|
||||
die("fgets: %s", strerror(errno));
|
||||
clearerr(stdin);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (progress_update) {
|
||||
|
|
Loading…
Reference in a new issue