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

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

Issue 145873004: Give localserver time to shut down (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup! Give Windows plenty of time to shut down, don't call KillProcess Created 6 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 | « no previous file | 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 7ee12b99f69fc5032ea477c5ca8a1915547e835f..2dd5a3ebe1ee90ced714ebdc996ea9ab0bf64e59 100644
--- a/net/test/spawned_test_server/local_test_server.cc
+++ b/net/test/spawned_test_server/local_test_server.cc
@@ -127,13 +127,14 @@ bool LocalTestServer::Stop() {
#if defined(OS_WIN)
// This kills all the processes in the job object.
job_handle_.Close();
-#endif
-
- // First check if the process has already terminated.
+ // Wait for the process to terminate.
M-A Ruel 2014/02/14 13:54:35 processes http://msdn.microsoft.com/library/windo
sigbjorn 2014/02/14 16:05:51 Fixed
M-A Ruel 2014/02/14 20:14:37 With TerminateJobObject(), since you obviously can
sigbjorn 2014/02/17 12:50:40 Done.
+ bool ret = base::WaitForSingleProcess(process_handle_,
+ base::TimeDelta::FromSeconds(60));
+#else
bool ret = base::WaitForSingleProcess(process_handle_, base::TimeDelta());
- if (!ret) {
+ if (!ret)
ret = base::KillProcess(process_handle_, 1, true);
M-A Ruel 2014/02/14 13:54:35 That doesn't compile.
sigbjorn 2014/02/14 16:05:51 Which compiler and how?
M-A Ruel 2014/02/14 20:14:37 Oh sorry, I missed the fact that you had removed {
- }
+#endif
if (ret) {
base::CloseProcessHandle(process_handle_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698