STORM-1482 Always run the crash loggers, they will check what to do and how to clean up.
parent
a517d32c48
commit
5f99d30c20
|
|
@ -2823,7 +2823,7 @@ bool LLAppViewer::initWindow()
|
|||
// Need to load feature table before cheking to start watchdog.
|
||||
bool use_watchdog = false;
|
||||
int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled");
|
||||
if(watchdog_enabled_setting == -1)
|
||||
if (watchdog_enabled_setting == -1)
|
||||
{
|
||||
use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled");
|
||||
}
|
||||
|
|
@ -2833,8 +2833,7 @@ bool LLAppViewer::initWindow()
|
|||
use_watchdog = bool(watchdog_enabled_setting);
|
||||
}
|
||||
|
||||
bool send_reports = gCrashSettings.getS32("CrashSubmitBehavior") != CRASH_BEHAVIOR_NEVER_SEND;
|
||||
if(use_watchdog && send_reports)
|
||||
if (use_watchdog)
|
||||
{
|
||||
LLWatchdog::getInstance()->init(watchdog_killer_callback);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,46 +361,35 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
|
|||
}
|
||||
else
|
||||
{
|
||||
const S32 cb = gCrashSettings.getS32("CrashSubmitBehavior");
|
||||
|
||||
// Always generate the report, have the logger do the asking, and
|
||||
// don't wait for the logger before exiting (-> total cleanup).
|
||||
if (CRASH_BEHAVIOR_NEVER_SEND != cb)
|
||||
{
|
||||
// launch the actual crash logger
|
||||
const char* ask_dialog = "-dialog";
|
||||
if (CRASH_BEHAVIOR_ASK != cb)
|
||||
ask_dialog = ""; // omit '-dialog' option
|
||||
const char * cmdargv[] =
|
||||
{cmd.c_str(),
|
||||
ask_dialog,
|
||||
"-user",
|
||||
(char*)LLGridManager::getInstance()->getGridLabel().c_str(),
|
||||
"-name",
|
||||
LLAppViewer::instance()->getSecondLifeTitle().c_str(),
|
||||
NULL};
|
||||
fflush(NULL);
|
||||
pid_t pid = fork();
|
||||
if (pid == 0)
|
||||
{ // child
|
||||
execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
|
||||
llwarns << "execv failure when trying to start " << cmd << llendl;
|
||||
_exit(1); // avoid atexit()
|
||||
// launch the actual crash logger
|
||||
const char * cmdargv[] =
|
||||
{cmd.c_str(),
|
||||
"-user",
|
||||
(char*)LLGridManager::getInstance()->getGridLabel().c_str(),
|
||||
"-name",
|
||||
LLAppViewer::instance()->getSecondLifeTitle().c_str(),
|
||||
NULL};
|
||||
fflush(NULL);
|
||||
pid_t pid = fork();
|
||||
if (pid == 0)
|
||||
{ // child
|
||||
execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
|
||||
llwarns << "execv failure when trying to start " << cmd << llendl;
|
||||
_exit(1); // avoid atexit()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pid > 0)
|
||||
{
|
||||
// DO NOT wait for child proc to die; we want
|
||||
// the logger to outlive us while we quit to
|
||||
// free up the screen/keyboard/etc.
|
||||
////int childExitStatus;
|
||||
////waitpid(pid, &childExitStatus, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pid > 0)
|
||||
{
|
||||
// DO NOT wait for child proc to die; we want
|
||||
// the logger to outlive us while we quit to
|
||||
// free up the screen/keyboard/etc.
|
||||
////int childExitStatus;
|
||||
////waitpid(pid, &childExitStatus, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "fork failure." << llendl;
|
||||
}
|
||||
llwarns << "fork failure." << llendl;
|
||||
}
|
||||
}
|
||||
// Sometimes signals don't seem to quit the viewer. Also, we may
|
||||
|
|
|
|||
|
|
@ -518,11 +518,7 @@ void LLAppViewerWin32::handleCrashReporting(bool reportFreeze)
|
|||
}
|
||||
else
|
||||
{
|
||||
S32 cb = gCrashSettings.getS32("CrashSubmitBehavior");
|
||||
if(cb != CRASH_BEHAVIOR_NEVER_SEND)
|
||||
{
|
||||
_spawnl(_P_NOWAIT, exe_path.c_str(), arg_str, NULL);
|
||||
}
|
||||
_spawnl(_P_NOWAIT, exe_path.c_str(), arg_str, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue