(original) (raw)
changeset: 69996:c9f07c69b138 branch: 2.7 parent: 69982:dd088470f090 user: Victor Stinner victor.stinner@haypocalc.com date: Tue May 10 00:22:59 2011 +0200 files: Misc/NEWS Parser/myreadline.c description: (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. diff -r dd088470f090 -r c9f07c69b138 Misc/NEWS --- a/Misc/NEWS Mon May 09 18:32:18 2011 +0300 +++ b/Misc/NEWS Tue May 10 00:22:59 2011 +0200 @@ -9,6 +9,9 @@ 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 #8651: PyArg_Parse*() functions raise an OverflowError if the file doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int (length bigger than 2^31-1 bytes). diff -r dd088470f090 -r c9f07c69b138 Parser/myreadline.c --- a/Parser/myreadline.c Mon May 09 18:32:18 2011 +0300 +++ b/Parser/myreadline.c Tue May 10 00:22:59 2011 +0200 @@ -77,6 +77,7 @@ } #endif /* MS_WINDOWS */ if (feof(fp)) { + clearerr(fp); return -1; /* EOF */ } #ifdef EINTR /victor.stinner@haypocalc.com