diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-10 00:19:53 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-10 00:19:53 +0200 |
| commit | 4755ab010f18863e305bbd17bbc16b7f39aed360 (patch) | |
| tree | ac5b61397fde63b3deb58bf2e4c7f964f2720aa6 /Parser/myreadline.c | |
| parent | f9756c2336029d082317718cd1b2e330f48164d6 (diff) | |
| download | cpython-git-4755ab010f18863e305bbd17bbc16b7f39aed360.tar.gz | |
Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,
clear the end-of-file indicator after CTRL+d.
Diffstat (limited to 'Parser/myreadline.c')
| -rw-r--r-- | Parser/myreadline.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c index 7166fc1d01..4cc4b2cf6b 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -73,6 +73,7 @@ my_fgets(char *buf, int len, FILE *fp) } #endif /* MS_WINDOWS */ if (feof(fp)) { + clearerr(fp); return -1; /* EOF */ } #ifdef EINTR |
