Skip to content
Permalink
Browse files
Properly check for write errors in metrics FileEmitter.
  • Loading branch information
brixen committed Jan 25, 2016
1 parent 903aae1 commit 49181363fdefbbefff89889cd3b5486f1383919b
Showing with 2 additions and 2 deletions.
  1. +2 −2 vm/metrics.cpp
@@ -73,7 +73,7 @@ namespace rubinius {
}
}

if(write(fd_, "\n", 1)) {
if(write(fd_, "\n", 1) < 0) {
logger::error("%s: unable to write file metrics", strerror(errno));
}
}
@@ -97,7 +97,7 @@ namespace rubinius {
}
}

if(write(fd_, "\n", 1)) {
if(write(fd_, "\n", 1) < 0) {
logger::error("%s: unable to write file metrics", strerror(errno));
}
}

0 comments on commit 4918136

Please sign in to comment.