summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 22:21:26 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 22:21:26 (GMT)
commit00c592553343c4cfa002071d6dc5cc1078e13f85 (patch)
tree32d0e9baa9f3abb5df320f644577f8bbad9993dd /Parser
parentf2231160016bfc1c855ee602f6c73e22cc10f88b (diff)
parentdb932786afdd569bbf2d6b84cfd5cdcb16cb4f27 (diff)
downloadcpython-00c592553343c4cfa002071d6dc5cc1078e13f85.zip
cpython-00c592553343c4cfa002071d6dc5cc1078e13f85.tar.gz
cpython-00c592553343c4cfa002071d6dc5cc1078e13f85.tar.bz2
(Merge 3.2) 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 50802c3..b12d052 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