aboutsummaryrefslogtreecommitdiff
path: root/libio/genops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/genops.c b/libio/genops.c
index db7fb180a3..c08598686d 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -615,7 +615,7 @@ DEFUN_VOID(_IO_flush_all_linebuffered)
{
_IO_FILE *fp;
for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
- if (fp->_flags & _IO_LINE_BUF)
+ if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
_IO_OVERFLOW (fp, EOF);
}