about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-02-24 16:07:57 -0800
committerUlrich Drepper <drepper@redhat.com>2010-02-24 16:07:57 -0800
commit7ca890b88e6ab7624afb1742a9fffb37ad5b3fc3 (patch)
tree2ddb131209e366f86b62ee4c98b0a150992521cd /libio
parent8c0b5f148eccd0a4d9714e72f50f13c586af59ec (diff)
downloadglibc-7ca890b88e6ab7624afb1742a9fffb37ad5b3fc3.tar.gz
glibc-7ca890b88e6ab7624afb1742a9fffb37ad5b3fc3.tar.xz
glibc-7ca890b88e6ab7624afb1742a9fffb37ad5b3fc3.zip
Fix reporting of I/O errors in *dprintf functions.
Diffstat (limited to 'libio')
-rw-r--r--libio/iovdprintf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libio/iovdprintf.c b/libio/iovdprintf.c
index edab849a44..5284ff8938 100644
--- a/libio/iovdprintf.c
+++ b/libio/iovdprintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997-2000, 2001, 2002, 2003, 2006
+/* Copyright (C) 1995, 1997-2000, 2001, 2002, 2003, 2006, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -60,6 +60,9 @@ _IO_vdprintf (d, format, arg)
 
   done = INTUSE(_IO_vfprintf) (&tmpfil.file, format, arg);
 
+  if (done != EOF && _IO_do_flush (&tmpfil.file) == EOF)
+    done = EOF;
+
   _IO_FINISH (&tmpfil.file);
 
   return done;