bool CrashHandlerImpl::initialize() { Autolock autoLock(&m_Lock); bool initialized = true; m_CrashHandlerPath = platform::getHelperExecutable(m_CrashHandlerApp); if(!createSharedMemory()) { return false; } fillBasicCrashInfo(); if(!registerCrashHandlers()) { destroySharedMemory(); initialized = false; } return initialized; }
bool CrashHandlerImpl::initialize() { Autolock autoLock(&m_Lock); bool initialized = true; fs::path local_path = fs::path(getExecutablePath()); if(!local_path.empty()) { local_path = local_path.parent() / m_CrashHandlerApp; if(fs::exists(local_path)) { m_CrashHandlerPath = local_path; } } if(m_CrashHandlerPath.empty()) { local_path = m_CrashHandlerApp; if(fs::exists(local_path)) { m_CrashHandlerPath = local_path; } } if(fs::libexec_dir && m_CrashHandlerPath.empty()) { local_path = fs::path(fs::libexec_dir) / m_CrashHandlerApp; if(fs::exists(local_path)) { m_CrashHandlerPath = local_path; } } if(!createSharedMemory()) { return false; } fillBasicCrashInfo(); if(!registerCrashHandlers()) { destroySharedMemory(); initialized = false; } return initialized; }