Limit the workaround in r1313 to Android only.

BUG=579
R=rmcilroy@chromium.org, vapier@chromium.org

Review URL: https://breakpad.appspot.com/1564002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1314 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
thestig@chromium.org 2014-04-15 18:29:15 +00:00
parent 32031a9136
commit be38be57e1

View file

@ -203,7 +203,14 @@ bool CrashGenerator::CreateChildCrash(
// tkill returns '0'. Retry a couple of times if the signal doesn't get
// through on the first go:
// https://code.google.com/p/google-breakpad/issues/detail?id=579
for (int i = 0; i < 60; i++) {
#if defined(__ANDROID__)
const int kRetries = 60;
const unsigned int kSleepTimeInSeconds = 1;
#else
const int kRetries = 1;
const unsigned int kSleepTimeInSeconds = 600;
#endif
for (int i = 0; i < kRetries; i++) {
if (tkill(*GetThreadIdPointer(crash_thread), crash_signal) == -1) {
perror("CrashGenerator: Failed to kill thread by signal");
} else {
@ -216,7 +223,7 @@ bool CrashGenerator::CreateChildCrash(
// really poll and wait for the kernel to declare the signal has been
// delivered. If it has, and things worked, we'd be killed, so the
// sleep length doesn't really matter.
sleep(1);
sleep(kSleepTimeInSeconds);
}
}
} else {