diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 20:12:01 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 20:12:01 +0000 |
commit | bf4878da52d63225c1c4779b1fc5222ef1796f4c (patch) | |
tree | e6dea540901df12c2fbc3f952a1c14d64bb6ba86 /base | |
parent | d5a287b32ba76e9f0afe86bef92d981234795399 (diff) | |
download | chromium_src-bf4878da52d63225c1c4779b1fc5222ef1796f4c.zip chromium_src-bf4878da52d63225c1c4779b1fc5222ef1796f4c.tar.gz chromium_src-bf4878da52d63225c1c4779b1fc5222ef1796f4c.tar.bz2 |
Fix ProcessSingletonWinTest using default profile.
Rename to ProcessSingletonTest.
Fix issues preventing the test from working on Linux, and enable it there.
Test both normal start up and first-run startup paths(win-only).
BUG=38572
TEST=run the test (both with and without an existing profile in the default place)
Review URL: http://codereview.chromium.org/2721007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/process_util_posix.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 6c5b5fe..cae70a5 100644 --- a/base/process_util_posix.cc +++ b/base/process_util_posix.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -159,6 +159,15 @@ bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) { exited = true; break; } + if (pid == -1) { + if (errno == ECHILD) { + // The wait may fail with ECHILD if another process also waited for + // the same pid, causing the process state to get cleaned up. + exited = true; + break; + } + DPLOG(ERROR) << "Error waiting for process " << process_id; + } sleep(1); } |