Remove the feature of run-mozilla.sh where we md5sum any file called 'core' in your home directory in order to see if it changes while running the program and potentially invoke GDB. (Bug 467638) r=bsmedberg
authorL. David Baron <dbaron@dbaron.org>
Mon, 08 Dec 2008 08:08:05 -0800
changeset 22508 9a55fd36efa20cf75b4c789f9bc4238d9fcbd31e
parent 22507 727b7a33350c5543e33d7203a0480d222a23083a
child 22509 7aa964f60934c55c5bcead514a92f93e2427ea72
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs467638
milestone1.9.2a1pre
Remove the feature of run-mozilla.sh where we md5sum any file called 'core' in your home directory in order to see if it changes while running the program and potentially invoke GDB. (Bug 467638) r=bsmedberg This feature is no longer particularly useful because core files on Linux are now generally called core.$PID (although occasionally core), and it is potentially quite harmful since Mozilla can become very slow to start for users with large core files in their home directory.
build/unix/run-mozilla.sh
--- a/build/unix/run-mozilla.sh
+++ b/build/unix/run-mozilla.sh
@@ -133,73 +133,20 @@ moz_run_program()
 	##
 	## Make sure the program is executable
 	##
 	if [ ! -x "$prog" ]
 	then
 		moz_bail "Cannot execute $prog."
 	fi
 	##
-	## Use md5sum to crc a core file.  If md5sum is not found on the system,
-	## then don't debug core files.
-	##
-	moz_test_binary /bin/type
-	if [ $? -eq 1 ]
-	then
-		crc_prog=`LC_MESSAGES=C type md5sum 2>/dev/null | awk '{print $3;}' 2>/dev/null | sed -e 's/\.$//'`
-	else
-		crc_prog=`which md5sum 2>/dev/null`
-	fi
-	if [ -x "$crc_prog" ]
-	then
-		DEBUG_CORE_FILES=1
-	fi
-	if [ "$DEBUG_CORE_FILES" ]
-	then
-		crc_old=
-		if [ -f core ]
-		then
-			crc_old=`$crc_prog core | awk '{print $1;}' `
-		fi
-	fi
-	##
 	## Run the program
 	##
 	"$prog" ${1+"$@"}
 	exitcode=$?
-	if [ "$DEBUG_CORE_FILES" ]
-	then
-		if [ -f core ]
-		then
-			crc_new=`$crc_prog core | awk '{print $1;}' `
-		fi
-	fi
-	if [ "$crc_old" != "$crc_new" ]
-	then
-		printf "\n\nOh no!  %s just dumped a core file.\n\n" $prog
-		printf "Do you want to debug this ? "
-		printf "You need a lot of memory for this, so watch out ? [y/n] "
-		read ans
-		if [ "$ans" = "y" ]
-		then
-			debugger=`moz_get_debugger`
-			if [ -x "$debugger" ]
-			then
-				echo "$debugger $prog core"
-
-				# See http://www.mozilla.org/unix/debugging-faq.html
-				# For why LD_BIND_NOW is needed
-				LD_BIND_NOW=1; export LD_BIND_NOW
-
-				$debugger "$prog" core
-			else
-				echo "Could not find a debugger on your system."
-			fi
-		fi
-	fi
 }
 ##########################################################################
 moz_debug_program()
 {
 	prog=$MOZ_PROGRAM
 	##
 	## Make sure the program is executable
 	##