mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
On Windows, -u implies binary mode for stdin/stdout
(as well as unbuffered stdout/stderr).
This commit is contained in:
parent
919cf1aff1
commit
f22d7e2c69
1 changed files with 4 additions and 0 deletions
|
|
@ -162,6 +162,10 @@ main(argc, argv)
|
|||
}
|
||||
|
||||
if (unbuffered) {
|
||||
#ifdef MS_WINDOWS
|
||||
_setmode(stdin, O_BINARY);
|
||||
_setmode(stdout, O_BINARY);
|
||||
#endif
|
||||
#ifndef MPW
|
||||
setbuf(stdout, (char *)NULL);
|
||||
setbuf(stderr, (char *)NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue