8059586: hs_err report should treat redirected core pattern

Reviewed-by: dholmes, sla, stuefe
This commit is contained in:
Yasumasa Suenaga 2014-12-14 20:18:17 -05:00 committed by David Holmes
parent c4978df7aa
commit bd3ea105b9
5 changed files with 82 additions and 9 deletions

View file

@ -4673,7 +4673,7 @@ bool os::is_headless_jre() {
// Get the default path to the core file
// Returns the length of the string
int os::get_core_path(char* buffer, size_t bufferSize) {
int n = jio_snprintf(buffer, bufferSize, "/cores");
int n = jio_snprintf(buffer, bufferSize, "/cores/core.%d", current_process_id());
// Truncate if theoretical string was longer than bufferSize
n = MIN2(n, (int)bufferSize);