summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-18 11:49:27 +0000
committertimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-18 11:49:27 +0000
commit2f7a6ea5c6d169d4dd773f273711f0ddeb2a133d (patch)
tree8f6c07a0552704cb188463ac3c865a2b6965787b /base
parent3e6c5d8f299ef6030737a0a8605d2d1926272256 (diff)
downloadchromium_src-2f7a6ea5c6d169d4dd773f273711f0ddeb2a133d.zip
chromium_src-2f7a6ea5c6d169d4dd773f273711f0ddeb2a133d.tar.gz
chromium_src-2f7a6ea5c6d169d4dd773f273711f0ddeb2a133d.tar.bz2
Increase the KillProcess timeout when running under Valgrind
BUG=17453 Review URL: http://codereview.chromium.org/7204002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/process_util_posix.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 287f5c7..a2398ed 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -28,6 +28,7 @@
#include "base/process_util.h"
#include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h"
+#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
@@ -227,6 +228,13 @@ bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) {
if (result && wait) {
int tries = 60;
+
+ if (RunningOnValgrind()) {
+ // Wait for some extra time when running under Valgrind since the child
+ // processes may take some time doing leak checking.
+ tries *= 2;
+ }
+
// The process may not end immediately due to pending I/O
bool exited = false;
while (tries-- > 0) {