summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2013-07-24 21:07:12 (GMT)
committerNico Weber <thakis@chromium.org>2013-07-24 21:07:12 (GMT)
commit2eecb07bdaedca1a37cf499ce7d6e6491e2046c8 (patch)
tree6bf3cc720adc6b38aaa9305e53dfbbcda7a9ede5 /src/build.cc
parentf6f00aa40f0c541df06747228b1cc928d4972b3e (diff)
downloadNinja-2eecb07bdaedca1a37cf499ce7d6e6491e2046c8.zip
Ninja-2eecb07bdaedca1a37cf499ce7d6e6491e2046c8.tar.gz
Ninja-2eecb07bdaedca1a37cf499ce7d6e6491e2046c8.tar.bz2
Build log write error checking.
Like f6f00aa40f0c541df06, but for the build log instead of the deps log.
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/build.cc b/src/build.cc
index 67e4634..45f6849 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -784,8 +784,11 @@ bool Builder::FinishCommand(CommandRunner::Result* result, string* err) {
disk_interface_->RemoveFile(rspfile);
if (scan_.build_log()) {
- scan_.build_log()->RecordCommand(edge, start_time, end_time,
- restat_mtime);
+ if (!scan_.build_log()->RecordCommand(edge, start_time, end_time,
+ restat_mtime)) {
+ *err = string("Error writing to build log: ") + strerror(errno);
+ return false;
+ }
}
if (!deps_type.empty() && !config_.dry_run) {