diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-09 22:22:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-09 22:22:59 (GMT) |
commit | 2c585f607e9164e4e416414010cbd09a6f361801 (patch) | |
tree | 1fd31cb0372e3f3c69abfe844f80cbfb97d215f4 /Parser | |
parent | b47553a19bcaf7b8dd5a2c7cbf0f64071c045504 (diff) | |
download | cpython-2c585f607e9164e4e416414010cbd09a6f361801.zip cpython-2c585f607e9164e4e416414010cbd09a6f361801.tar.gz cpython-2c585f607e9164e4e416414010cbd09a6f361801.tar.bz2 |
(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 8a76e0c..34fb45c 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 |