mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6938627: Make temporary directory use property java.io.tmpdir when specified
Get java.io.tmpdir property in os::get_temp_directory() and call this instead of harcoding "/tmp". Don't assume trailing file_separator either. Reviewed-by: dholmes, kamg
This commit is contained in:
parent
7aaaad73cf
commit
47cda47c42
11 changed files with 83 additions and 51 deletions
|
@ -807,8 +807,8 @@ void VMError::report_and_die() {
|
|||
if (fd == -1) {
|
||||
// try temp directory
|
||||
const char * tmpdir = os::get_temp_directory();
|
||||
jio_snprintf(buffer, sizeof(buffer), "%shs_err_pid%u.log",
|
||||
(tmpdir ? tmpdir : ""), os::current_process_id());
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue