8062370: Various minor code improvements

A lot of fixes useful to improve the code quality.

Reviewed-by: coleenp, dholmes
This commit is contained in:
Goetz Lindenmaier 2014-10-29 10:13:24 +01:00
parent f048251de8
commit 0aa09022fa
35 changed files with 141 additions and 64 deletions

View file

@ -975,11 +975,13 @@ void VMError::report_and_die() {
// Run error reporting to determine whether or not to report the crash.
if (!transmit_report_done && should_report_bug(first_error->_id)) {
transmit_report_done = true;
FILE* hs_err = os::open(log.fd(), "r");
const int fd2 = ::dup(log.fd());
FILE* const hs_err = ::fdopen(fd2, "r");
if (NULL != hs_err) {
ErrorReporter er;
er.call(hs_err, buffer, O_BUFLEN);
}
::fclose(hs_err);
}
if (log.fd() != defaultStream::output_fd()) {