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