Mercurial > hg > graal-compiler
comparison src/os/linux/vm/attachListener_linux.cpp @ 1497:96d554193f72
6944822: Fix for 6938627 exposes problem with hard-coded buffer sizes
Summary: Make tmpdir buffer sizes MAX_PATH+1
Reviewed-by: dholmes, coleenp
Contributed-by: andreas.kohn@fredhopper.com
author | coleenp |
---|---|
date | Mon, 19 Apr 2010 18:58:31 -0400 |
parents | a2ea687fdc7c |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1355:6ccd32c284ac | 1497:96d554193f72 |
---|---|
459 // or /tmp then this is the trigger to start the attach mechanism | 459 // or /tmp then this is the trigger to start the attach mechanism |
460 bool AttachListener::is_init_trigger() { | 460 bool AttachListener::is_init_trigger() { |
461 if (init_at_startup() || is_initialized()) { | 461 if (init_at_startup() || is_initialized()) { |
462 return false; // initialized at startup or already initialized | 462 return false; // initialized at startup or already initialized |
463 } | 463 } |
464 char fn[128]; | 464 char fn[PATH_MAX+1]; |
465 sprintf(fn, ".attach_pid%d", os::current_process_id()); | 465 sprintf(fn, ".attach_pid%d", os::current_process_id()); |
466 int ret; | 466 int ret; |
467 struct stat64 st; | 467 struct stat64 st; |
468 RESTARTABLE(::stat64(fn, &st), ret); | 468 RESTARTABLE(::stat64(fn, &st), ret); |
469 if (ret == -1) { | 469 if (ret == -1) { |