mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8180945: vmError.cpp : adjust dup and fclose
Reviewed-by: dholmes
This commit is contained in:
parent
d946df7272
commit
b47172b765
1 changed files with 7 additions and 5 deletions
|
@ -1331,12 +1331,14 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
|
||||||
if (!transmit_report_done && should_report_bug(_id)) {
|
if (!transmit_report_done && should_report_bug(_id)) {
|
||||||
transmit_report_done = true;
|
transmit_report_done = true;
|
||||||
const int fd2 = ::dup(log.fd());
|
const int fd2 = ::dup(log.fd());
|
||||||
FILE* const hs_err = ::fdopen(fd2, "r");
|
if (fd2 != -1) {
|
||||||
if (NULL != hs_err) {
|
FILE* const hs_err = ::fdopen(fd2, "r");
|
||||||
ErrorReporter er;
|
if (NULL != hs_err) {
|
||||||
er.call(hs_err, buffer, O_BUFLEN);
|
ErrorReporter er;
|
||||||
|
er.call(hs_err, buffer, O_BUFLEN);
|
||||||
|
::fclose(hs_err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
::fclose(hs_err);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log.fd() != defaultStream::output_fd()) {
|
if (log.fd() != defaultStream::output_fd()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue