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
This commit is contained in:
parent
44973b0291
commit
30c976216b
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue