Mercurial > hg > graal-compiler
diff src/share/vm/utilities/vmError.cpp @ 1353:a2ea687fdc7c
6938627: Make temporary directory use property java.io.tmpdir when specified
Summary: 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
author | coleenp |
---|---|
date | Wed, 31 Mar 2010 16:51:18 -0700 |
parents | 547f81740344 |
children | c544d979f886 |
line wrap: on
line diff
--- a/src/share/vm/utilities/vmError.cpp Fri Mar 26 11:10:26 2010 -0400 +++ b/src/share/vm/utilities/vmError.cpp Wed Mar 31 16:51:18 2010 -0700 @@ -807,8 +807,8 @@ 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); }