Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Properly check for write errors in metrics FileEmitter.
  • Loading branch information
brixen committed Jan 25, 2016
1 parent 903aae1 commit 4918136
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vm/metrics.cpp
Expand Up @@ -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));
}
}
Expand All @@ -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));
}
}
Expand Down

0 comments on commit 4918136

Please sign in to comment.