diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-09-18 18:16:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-18 18:16:24 -0700 |
commit | c5a2235e7a249c01999795f45ceb4697150dc3e1 (patch) | |
tree | 8ae9f3bf33888c125200b0f4b8998a8effb06c5b | |
parent | ee3645ac961aec171cc56ec962723ac5fd28cf38 (diff) |
Turn off sLogInSignal to avoid crashing. (#2607)
fixes secondlife/viewer#2566
-rw-r--r-- | indra/llcommon/llapp.cpp | 8 | ||||
-rw-r--r-- | indra/llcommon/llapp.h | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 3db03aec7d..08a43983d3 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -88,10 +88,6 @@ LLApp* LLApp::sApplication = NULL; // and disables crashlogger bool LLApp::sDisableCrashlogger = false; -// Local flag for whether or not to do logging in signal handlers. -//static -bool LLApp::sLogInSignal = true; - // static // Keeps track of application status LLScalarCond<LLApp::EAppStatus> LLApp::sStatus{LLApp::APP_STATUS_STOPPED}; @@ -596,6 +592,10 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) // We do the somewhat sketchy operation of blocking in here until the error handler // has gracefully stopped the app. + // FIXME(brad) - we are using this handler for asynchronous signals as well, so sLogInSignal is currently + // disabled for safety. we need to find a way to selectively reenable it when it is safe. + // see issue secondlife/viewer#2566 + if (LLApp::sLogInSignal) { LL_INFOS() << "Signal handler - Got signal " << signum << " - " << apr_signal_description_get(signum) << LL_ENDL; diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index d90ecdf661..3d18864b80 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -339,8 +339,12 @@ private: friend void default_unix_signal_handler(int signum, siginfo_t *info, void *); #endif -public: - static bool sLogInSignal; +private: +#ifdef LL_RELEASE_FOR_DOWNLOAD + static constexpr bool sLogInSignal = false; +#else + static constexpr bool sLogInSignal = true; +#endif }; #endif // LL_LLAPP_H |