* output.c (pump_from_tmp): [SV 42378] Flush the output file regularly.
authorPiotr Jaroszynski <pjaroszynski@nvidia.com>
Thu, 15 May 2014 18:40:27 +0000 (11:40 -0700)
committerPaul Smith <psmith@gnu.org>
Mon, 7 Jul 2014 07:10:17 +0000 (03:10 -0400)
Copyright-paperwork-exempt: yes

output.c

index b2584f11d77b36cbc5c8ea0ae3e9114edc8bb8aa..625413b4394b326f3b46e96cf85ff19d85c6c5b7 100644 (file)
--- a/output.c
+++ b/output.c
@@ -240,7 +240,11 @@ pump_from_tmp (int from, FILE *to)
       if (len <= 0)
         break;
       if (fwrite (buffer, len, 1, to) < 1)
-        perror ("fwrite()");
+        {
+          perror ("fwrite()");
+          break;
+        }
+      fflush (to);
     }
 
 #ifdef WINDOWS32