diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-10 00:22:59 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-10 00:22:59 +0200 |
commit | a5c3962c4b40d84039b9e48dbe82ed82712fde72 (patch) | |
tree | afa9d2ab17bc364f51bd9af6a32f79682cf5ab03 /Parser | |
parent | e3dc6fb9c89a5b998b4b97d61a20e6a72bcf3935 (diff) | |
download | cpython-a5c3962c4b40d84039b9e48dbe82ed82712fde72.tar.gz |
(Merge 3.1) 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')
-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 8a76e0c23b..34fb45c932 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -77,6 +77,7 @@ my_fgets(char *buf, int len, FILE *fp) } #endif /* MS_WINDOWS */ if (feof(fp)) { + clearerr(fp); return -1; /* EOF */ } #ifdef EINTR |