Merge with 3.2: issue #14433
This commit is contained in:
commit
ce58ed3e7c
|
@ -10,6 +10,9 @@ What's New in Python 3.3.0 Alpha 3?
|
|||
Core and Builtins
|
||||
-----------------
|
||||
|
||||
- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin
|
||||
is closed.
|
||||
|
||||
- Issue #14521: Make result of float('nan') and float('-nan') more
|
||||
consistent across platforms.
|
||||
|
||||
|
|
|
@ -42,7 +42,10 @@ my_fgets(char *buf, int len, FILE *fp)
|
|||
(void)(PyOS_InputHook)();
|
||||
errno = 0;
|
||||
clearerr(fp);
|
||||
p = fgets(buf, len, fp);
|
||||
if (_PyVerify_fd(fileno(fp)))
|
||||
p = fgets(buf, len, fp);
|
||||
else
|
||||
p = NULL;
|
||||
if (p != NULL)
|
||||
return 0; /* No error */
|
||||
err = errno;
|
||||
|
|
Loading…
Reference in New Issue