##// END OF EJS Templates
procutil: use unbuffered stdout on Windows...
Sune Foldager -
r38722:0b63a674 4.6.2 stable
parent child Browse files
Show More
@@ -42,9 +42,13 b' def isatty(fp):'
42
42
43 # glibc determines buffering on first write to stdout - if we replace a TTY
43 # glibc determines buffering on first write to stdout - if we replace a TTY
44 # destined stdout with a pipe destined stdout (e.g. pager), we want line
44 # destined stdout with a pipe destined stdout (e.g. pager), we want line
45 # buffering
45 # buffering (or unbuffered, on Windows)
46 if isatty(stdout):
46 if isatty(stdout):
47 stdout = os.fdopen(stdout.fileno(), r'wb', 1)
47 if pycompat.iswindows:
48 # Windows doesn't support line buffering
49 stdout = os.fdopen(stdout.fileno(), r'wb', 0)
50 else:
51 stdout = os.fdopen(stdout.fileno(), r'wb', 1)
48
52
49 if pycompat.iswindows:
53 if pycompat.iswindows:
50 from .. import windows as platform
54 from .. import windows as platform
General Comments 0
You need to be logged in to leave comments. Login now