stone_linden avatar stone_linden committed 2c0b1ea

STORM-1482 Always run the crash loggers, they will check what to do and how to clean up.

Comments (0)

Files changed (3)

indra/newview/llappviewer.cpp

 	// 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");
 	}
 		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);
 	}

indra/newview/llappviewerlinux.cpp

 	}
 	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

indra/newview/llappviewerwin32.cpp

 	}
 	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);
 	}
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.