projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d41958
)
On MS-Windows, fflush stderr after newline
author
Paul Eggert
<eggert@cs.ucla.edu>
Thu, 11 Mar 2021 18:35:04 +0000
(10:35 -0800)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Thu, 11 Mar 2021 18:43:33 +0000
(10:43 -0800)
Problem reported by Ioannis Kappas (Bug#46388).
* src/sysdep.c (errputc) [WINDOWSNT]: Flush stderr after newline.
src/sysdep.c
patch
|
blob
|
history
diff --git
a/src/sysdep.c
b/src/sysdep.c
index 24d8832b2f3a3347a8a6c8ba9ae8335008cbc708..d940acc4e05c9584e493d1dbea75326df25082ae 100644
(file)
--- a/
src/sysdep.c
+++ b/
src/sysdep.c
@@
-2670,6
+2670,13
@@
void
errputc (int c)
{
fputc_unlocked (c, errstream ());
+
+#ifdef WINDOWSNT
+ /* Flush stderr after outputting a newline since stderr is fully
+ buffered when redirected to a pipe, contrary to POSIX. */
+ if (c == '\n')
+ fflush_unlocked (stderr);
+#endif
}
void