when using bugsplat, do not catch SIGABRT; also, fix signal setting in Mac (broken macro)
parent
66970f2a8c
commit
a45ca18ff8
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue