From 30c976216bbd7232d1c83d5d9c4cb48b0cb0c14a Mon Sep 17 00:00:00 2001 From: Ken Mixter Date: Mon, 18 Oct 2010 12:09:31 -0700 Subject: [PATCH] crash-reporter: fix race condition between cron crash_sender and test invoked Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 BUG=7765 TEST=CrashSender and UserCrash Review URL: http://codereview.chromium.org/3748011 --- crash_reporter/crash_sender | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crash_reporter/crash_sender b/crash_reporter/crash_sender index c9eec0591..244c31d2a 100644 --- a/crash_reporter/crash_sender +++ b/crash_reporter/crash_sender @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} # Path to hardware class description. HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" +# Ignore PAUSE_CRASH_SENDING file if set. +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} + # Maximum crashes to send per day. MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} @@ -343,7 +346,8 @@ send_crashes() { main() { trap cleanup EXIT INT TERM - if [ -e "${PAUSE_CRASH_SENDING}" ]; then + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." exit 1 fi