diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-08-14 17:10:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-14 17:10:28 -0400 |
| commit | 05a5a15c99bd1174736da66c58b7080c75a8acb8 (patch) | |
| tree | e73b7b75809ab21a1933b7cb9f78f4fc5271b061 /indra/llcommon/llapp.cpp | |
| parent | a3c380acd9256102730574afb261aa6266f9a2a5 (diff) | |
| parent | 0007f7f99fc37b45ad7f3ad6df4238893c50a5be (diff) | |
Merge pull request #6132 from secondlife/geenz/linux-to-develop
Geenz/linux (and 26.3) to develop
Diffstat (limited to 'indra/llcommon/llapp.cpp')
| -rw-r--r-- | indra/llcommon/llapp.cpp | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index f92bb98ba6..02d6da989a 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -37,7 +37,7 @@ #endif #include "llcommon.h" -#include "llapr.h" + #include "llerrorcontrol.h" #include "llframetimer.h" #include "lllivefile.h" @@ -53,19 +53,13 @@ // // Signal handling #ifndef LL_WINDOWS +#include "apr_signal.h" + # include <signal.h> # include <unistd.h> // for fork() void setup_signals(); void default_unix_signal_handler(int signum, siginfo_t *info, void *); -#if LL_LINUX -#else -// Called by breakpad exception handler after the minidump has been generated. -bool unix_post_minidump_callback(const char *dump_dir, - const char *minidump_id, - void *context, bool succeeded); -#endif - # if LL_DARWIN /* OSX doesn't support SIGRT* */ S32 LL_SMACKDOWN_SIGNAL = SIGUSR1; @@ -721,47 +715,4 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) } } -bool unix_post_minidump_callback(const char *dump_dir, - const char *minidump_id, - void *context, bool succeeded) -{ - // Copy minidump file path into fixed buffer in the app instance to avoid - // heap allocations in a crash handler. - - // path format: <dump_dir>/<minidump_id>.dmp - auto dirPathLength = strlen(dump_dir); - auto idLength = strlen(minidump_id); - - // The path must not be truncated. - llassert((dirPathLength + idLength + 5) <= LLApp::MAX_MINDUMP_PATH_LENGTH); - - char * path = LLApp::instance()->getMiniDumpFilename(); - auto remaining = LLApp::MAX_MINDUMP_PATH_LENGTH; - strncpy(path, dump_dir, remaining); - remaining -= dirPathLength; - path += dirPathLength; - if (remaining > 0 && dirPathLength > 0 && path[-1] != '/') - { - *path++ = '/'; - --remaining; - } - if (remaining > 0) - { - strncpy(path, minidump_id, remaining); - remaining -= idLength; - path += idLength; - strncpy(path, ".dmp", remaining); - } - - LL_INFOS("CRASHREPORT") << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL; - LLApp::runErrorHandler(); - -#ifndef LL_RELEASE_FOR_DOWNLOAD - clear_signals(); - return false; -#else - return true; -#endif -} #endif // !WINDOWS - |
