< prev index next >

src/os/bsd/vm/attachListener_bsd.cpp

Print this page

        

*** 454,464 **** RESTARTABLE(::stat(fn, &st), ret); if (ret == 0) { ret = ::unlink(fn); if (ret == -1) { ! debug_only(warning("failed to remove stale attach pid file at %s", fn)); } } } int AttachListener::pd_init() { --- 454,464 ---- RESTARTABLE(::stat(fn, &st), ret); if (ret == 0) { ret = ::unlink(fn); if (ret == -1) { ! log_debug(attach)("Failed to remove stale attach pid file at %s", fn); } } } int AttachListener::pd_init() {
*** 498,513 **** --- 498,519 ---- struct stat st; snprintf(path, PATH_MAX + 1, "%s/.attach_pid%d", os::get_temp_directory(), os::current_process_id()); RESTARTABLE(::stat(path, &st), ret); + if (ret == -1) { + log_debug(attach)("Failed to find attach file: %s", fn); + } if (ret == 0) { // simple check to avoid starting the attach mechanism when // a bogus user creates the file if (st.st_uid == geteuid()) { init(); + log_trace(attach)("Attach trigerred by %s", fn); return true; + } else { + log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not triggered", fn, st.st_uid, geteuid()); } } return false; }
< prev index next >