Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
1330:4a9cc99938e3 | 1353:a2ea687fdc7c |
---|---|
805 } | 805 } |
806 | 806 |
807 if (fd == -1) { | 807 if (fd == -1) { |
808 // try temp directory | 808 // try temp directory |
809 const char * tmpdir = os::get_temp_directory(); | 809 const char * tmpdir = os::get_temp_directory(); |
810 jio_snprintf(buffer, sizeof(buffer), "%shs_err_pid%u.log", | 810 jio_snprintf(buffer, sizeof(buffer), "%s%shs_err_pid%u.log", |
811 (tmpdir ? tmpdir : ""), os::current_process_id()); | 811 tmpdir, os::file_separator(), os::current_process_id()); |
812 fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666); | 812 fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666); |
813 } | 813 } |
814 | 814 |
815 if (fd != -1) { | 815 if (fd != -1) { |
816 out.print_raw("# An error report file with more information is saved as:\n# "); | 816 out.print_raw("# An error report file with more information is saved as:\n# "); |