summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-04-05 16:12:02 (GMT)
committerGitHub <noreply@github.com>2018-04-05 16:12:02 (GMT)
commit5d43e7457162c74bab25ada64a5bf87489ca5896 (patch)
treee010aa18736e8593cf64617603895daf55221111 /src
parent74b76d30105c74245628ebfa20148983fa0fc3d5 (diff)
parentc1c8bbaa5fc95ee90ce50d2aa5e16f4c86431114 (diff)
downloadNinja-5d43e7457162c74bab25ada64a5bf87489ca5896.zip
Ninja-5d43e7457162c74bab25ada64a5bf87489ca5896.tar.gz
Ninja-5d43e7457162c74bab25ada64a5bf87489ca5896.tar.bz2
Merge pull request #1361 from ppluciennik/ppluciennik/flush_log
Flush changes into .ninja_log right away.
Diffstat (limited to 'src')
-rw-r--r--src/build_log.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 648617c..c75be95 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -167,6 +167,9 @@ bool BuildLog::RecordCommand(Edge* edge, int start_time, int end_time,
if (log_file_) {
if (!WriteEntry(log_file_, *log_entry))
return false;
+ if (fflush(log_file_) != 0) {
+ return false;
+ }
}
}
return true;