summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 19:28:41 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 19:28:41 +0000
commitcd4fd156aba80ddffd3fffd8e2d8703247181fe0 (patch)
tree1f4b2dc5f58e5f534b033f71e0e48cc5549c6732 /base/process_util_unittest.cc
parenta6309f8198825442d77f0fc9aa70c82ae5dd6d04 (diff)
downloadchromium_src-cd4fd156aba80ddffd3fffd8e2d8703247181fe0.zip
chromium_src-cd4fd156aba80ddffd3fffd8e2d8703247181fe0.tar.gz
chromium_src-cd4fd156aba80ddffd3fffd8e2d8703247181fe0.tar.bz2
Fix the windows implementation of KillProcess and WaitForSingleProcess to not close the process handle that they do not own.
Review URL: http://codereview.chromium.org/24004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 09922cc..97ba756 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -34,6 +34,7 @@ TEST_F(ProcessUtilTest, SpawnChild) {
ASSERT_NE(static_cast<ProcessHandle>(NULL), handle);
EXPECT_TRUE(WaitForSingleProcess(handle, 5000));
+ base::CloseProcessHandle(handle);
}
MULTIPROCESS_TEST_MAIN(SlowChildProcess) {
@@ -65,6 +66,7 @@ TEST_F(ProcessUtilTest, KillSlowChild) {
fclose(fp);
EXPECT_TRUE(base::WaitForSingleProcess(handle, 5000));
EXPECT_EQ(oldcount, GetProcessCount(L"base_unittests" EXE_SUFFIX, 0));
+ base::CloseProcessHandle(handle);
}
// TODO(estade): if possible, port these 2 tests.
@@ -216,6 +218,7 @@ TEST_F(ProcessUtilTest, FDRemapping) {
ASSERT_EQ(0, num_open_files);
EXPECT_TRUE(WaitForSingleProcess(handle, 1000));
+ base::CloseProcessHandle(handle);
close(fds[0]);
close(sockets[0]);
close(sockets[1]);