diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 23:01:34 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 23:01:34 +0000 |
commit | 4575021b2000963304a99b8cf6a4f0ba7afb88d3 (patch) | |
tree | 806a3445fdd4fe0876eb438ef1835252c955c496 /base/process_util_posix.cc | |
parent | 07dc5ffd9a5d10d55e2299651fe7a826d7fd7aba (diff) | |
download | chromium_src-4575021b2000963304a99b8cf6a4f0ba7afb88d3.zip chromium_src-4575021b2000963304a99b8cf6a4f0ba7afb88d3.tar.gz chromium_src-4575021b2000963304a99b8cf6a4f0ba7afb88d3.tar.bz2 |
Revert r14620 which was a rollback of r14549 and r14508. This
change re-enables the ui tests. Since jam re-enabled some tests,
I had to #ifdef around 4 tests that are not shutting down cleanly
on linux. It looks like we have renderers that aren't shutting
down properly (pegged at 100% cpu).
Review URL: http://codereview.chromium.org/100061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_posix.cc')
-rw-r--r-- | base/process_util_posix.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 562b8e9..2e3fd55 100644 --- a/base/process_util_posix.cc +++ b/base/process_util_posix.cc @@ -22,6 +22,7 @@ #include "base/scoped_ptr.h" #include "base/sys_info.h" #include "base/time.h" +#include "base/waitable_event.h" const int kMicrosecondsPerSecond = 1000000; @@ -207,7 +208,7 @@ int WaitpidWithTimeout(ProcessHandle handle, int wait_milliseconds, // has been installed. This means that when a SIGCHLD is sent, it will exit // depending on behavior external to this function. // - // This function is used primarilly for unit tests, if we want to use it in + // This function is used primarily for unit tests, if we want to use it in // the application itself it would probably be best to examine other routes. int status = -1; pid_t ret_pid = waitpid(handle, &status, WNOHANG); @@ -243,7 +244,11 @@ int WaitpidWithTimeout(ProcessHandle handle, int wait_milliseconds, bool WaitForSingleProcess(ProcessHandle handle, int wait_milliseconds) { bool waitpid_success; - int status = WaitpidWithTimeout(handle, wait_milliseconds, &waitpid_success); + int status; + if (wait_milliseconds == base::kNoTimeout) + waitpid_success = (waitpid(handle, &status, 0) != -1); + else + status = WaitpidWithTimeout(handle, wait_milliseconds, &waitpid_success); if (status != -1) { DCHECK(waitpid_success); return WIFEXITED(status); |