summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 22:22:59 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 22:22:59 (GMT)
commit2c585f607e9164e4e416414010cbd09a6f361801 (patch)
tree1fd31cb0372e3f3c69abfe844f80cbfb97d215f4 /Parser
parentb47553a19bcaf7b8dd5a2c7cbf0f64071c045504 (diff)
downloadcpython-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.c1
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