mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7009828: Fix for 6938627 breaks visualvm monitoring when -Djava.io.tmpdir is defined
Change get_temp_directory() back to /tmp and %TEMP% like it always was and where the tools expect it to be. Reviewed-by: phh, dcubed, kamg, alanb
This commit is contained in:
parent
b6d2068ee2
commit
8d210c170e
4 changed files with 14 additions and 14 deletions
|
@ -874,11 +874,13 @@ void VMError::report_and_die() {
|
|||
}
|
||||
|
||||
if (fd == -1) {
|
||||
// try temp directory
|
||||
const char * tmpdir = os::get_temp_directory();
|
||||
jio_snprintf(buffer, sizeof(buffer), "%s%shs_err_pid%u.log",
|
||||
tmpdir, os::file_separator(), os::current_process_id());
|
||||
fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
// try temp directory if it exists.
|
||||
if (tmpdir != NULL && tmpdir[0] != '\0') {
|
||||
jio_snprintf(buffer, sizeof(buffer), "%s%shs_err_pid%u.log",
|
||||
tmpdir, os::file_separator(), os::current_process_id());
|
||||
fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
}
|
||||
}
|
||||
|
||||
if (fd != -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue