when using bugsplat, do not catch SIGABRT; also, fix signal setting in Mac (broken macro)

meow-7.2.2
Oz Linden 2019-09-25 12:59:20 -04:00
parent 66970f2a8c
commit a45ca18ff8
3 changed files with 11 additions and 5 deletions

View File

@ -779,7 +779,9 @@ void setup_signals()
act.sa_flags = SA_SIGINFO;
// Synchronous signals
# ifndef LL_BUGSPLAT
sigaction(SIGABRT, &act, NULL);
# endif
sigaction(SIGALRM, &act, NULL);
sigaction(SIGBUS, &act, NULL);
sigaction(SIGFPE, &act, NULL);
@ -816,7 +818,9 @@ void clear_signals()
act.sa_flags = SA_SIGINFO;
// Synchronous signals
# ifndef LL_BUGSPLAT
sigaction(SIGABRT, &act, NULL);
# endif
sigaction(SIGALRM, &act, NULL);
sigaction(SIGBUS, &act, NULL);
sigaction(SIGFPE, &act, NULL);
@ -869,6 +873,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
return;
case SIGABRT:
// Note that this handler is not set for SIGABRT when using Bugsplat
// Abort just results in termination of the app, no funky error handling.
if (LLApp::sLogInSignal)
{

View File

@ -2231,8 +2231,8 @@ void LLAppViewer::initLoggingAndGetLastDuration()
}
// TBD - temporary location for fatal hook (should be above, but for now it logs...)
LL_DEBUGS("FatalHook") << "initial setting of default fatalhook" << LL_ENDL;
LLError::setFatalHook(fatalErrorHook);
}
bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,

View File

@ -333,11 +333,12 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
unsigned int reset_count = 0;
#define SET_SIG(S) sigaction(SIGABRT, &act, &old_act); \
if(act.sa_sigaction != old_act.sa_sigaction) \
++reset_count;
#define SET_SIG(SIGNAL) sigaction(SIGNAL, &act, &old_act); \
if(act.sa_sigaction != old_act.sa_sigaction) ++reset_count;
// Synchronous signals
SET_SIG(SIGABRT)
# ifndef LL_BUGSPLAT
SET_SIG(SIGABRT) // let bugsplat catch this
# endif
SET_SIG(SIGALRM)
SET_SIG(SIGBUS)
SET_SIG(SIGFPE)