From: Victor Stinner Date: Mon, 9 May 2011 22:19:53 +0000 (+0200) Subject: Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, X-Git-Tag: v3.2.1rc1~34^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4755ab010f18863e305bbd17bbc16b7f39aed360;p=thirdparty%2FPython%2Fcpython.git Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, clear the end-of-file indicator after CTRL+d. --- diff --git a/Misc/NEWS b/Misc/NEWS index 2a31e1086cba..951a136c40ce 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.1.4? Core and Builtins ----------------- +- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, + clear the end-of-file indicator after CTRL+d. + - Issue #9756: When calling a method descriptor or a slot wrapper descriptor, the check of the object type doesn't read the __class__ attribute anymore. Fix a crash if a class override its __class__ attribute (e.g. a proxy of the diff --git a/Parser/myreadline.c b/Parser/myreadline.c index 7166fc1d0106..4cc4b2cf6b66 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