mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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)) {
|
||||
transmit_report_done = true;
|
||||
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);
|
||||
if (fd2 != -1) {
|
||||
FILE* const hs_err = ::fdopen(fd2, "r");
|
||||
if (NULL != hs_err) {
|
||||
ErrorReporter er;
|
||||
er.call(hs_err, buffer, O_BUFLEN);
|
||||
::fclose(hs_err);
|
||||
}
|
||||
}
|
||||
::fclose(hs_err);
|
||||
}
|
||||
|
||||
if (log.fd() != defaultStream::output_fd()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue