Commit 0c8a66ae authored by Guido van Rossum's avatar Guido van Rossum

OK, I lied. On Windows, _IOLBF seems to be the same as full

buffering, so to get the normal behavior back, I set it to
unbuffered.
parent fc0248e9
......@@ -204,10 +204,14 @@ main(argc, argv)
#endif
}
else if (Py_InteractiveFlag) {
char *ibuffer = malloc(BUFSIZ);
char *obuffer = malloc(BUFSIZ);
setvbuf(stdin, ibuffer, _IOLBF, BUFSIZ);
setvbuf(stdout, obuffer, _IOLBF, BUFSIZ);
#ifdef MS_WINDOWS
/* Doesn't have to have line-buffered -- use unbuffered */
setvbuf(stdin, (char *)NULL, _IONBF, BUFSIZ);
setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ);
#else
setvbuf(stdin, (char *)NULL, _IOLBF, BUFSIZ);
setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ);
#endif
/* Leave stderr alone - it should be unbuffered anyway. */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment