summaryrefslogtreecommitdiff
path: root/output.c
diff options
context:
space:
mode:
authorPiotr Jaroszynski <pjaroszynski@nvidia.com>2014-05-15 11:40:27 -0700
committerPaul Smith <psmith@gnu.org>2014-07-07 03:10:17 -0400
commit8d577c2ff43d4808cd5a3754dcfd04549b086044 (patch)
tree4ce6a5758b5b51373690a7492e6c7372153a2db7 /output.c
parente44d6a12bbc6dd62ecf463fd98c031e5f79f4e9b (diff)
downloadgunmake-8d577c2ff43d4808cd5a3754dcfd04549b086044.tar.gz
* output.c (pump_from_tmp): [SV 42378] Flush the output file regularly.
Copyright-paperwork-exempt: yes
Diffstat (limited to 'output.c')
-rw-r--r--output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/output.c b/output.c
index b2584f1..625413b 100644
--- 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