summaryrefslogtreecommitdiff
path: root/compat/winansi.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/winansi.c')
-rw-r--r--compat/winansi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/winansi.c b/compat/winansi.c
index 56658ec4f8..dac5d01c53 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -510,6 +510,8 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
*/
close(new_fd);
+ if (fd == 2)
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
fd_is_interactive[fd] |= FD_SWAPPED;
return duplicate;
@@ -547,6 +549,8 @@ static void detect_msys_tty(int fd)
!wcsstr(name, L"-pty"))
return;
+ if (fd == 2)
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
fd_is_interactive[fd] |= FD_MSYS;
}