Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: net/test/spawned_test_server/local_test_server.cc

Issue 938453002: Remove base::WaitForSingleProcess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format :( Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/local_test_server.cc
diff --git a/net/test/spawned_test_server/local_test_server.cc b/net/test/spawned_test_server/local_test_server.cc
index 309c69c5a135548120ea0f7499dede05db5dc7a4..6ecb7d9cc7769363c900f26a3fefa957c5f50060 100644
--- a/net/test/spawned_test_server/local_test_server.cc
+++ b/net/test/spawned_test_server/local_test_server.cc
@@ -125,16 +125,15 @@ bool LocalTestServer::Stop() {
return true;
// First check if the process has already terminated.
- bool ret = base::WaitForSingleProcess(process_.Handle(), base::TimeDelta());
- if (!ret) {
+ int exit_code;
+ bool ret = process_.WaitForExitWithTimeout(base::TimeDelta(), &exit_code);
+ if (!ret)
ret = base::KillProcess(process_.Handle(), 1, true);
- }
- if (ret) {
+ if (ret)
process_.Close();
- } else {
+ else
VLOG(1) << "Kill failed?";
- }
return ret;
}
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698