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 bf1b0590786d683c2e3b768626c1b7a0e6c053db..8679d7b1554ff233390349fdf0607c62b92052e9 100644 |
--- a/net/test/spawned_test_server/local_test_server.cc |
+++ b/net/test/spawned_test_server/local_test_server.cc |
@@ -124,10 +124,16 @@ bool LocalTestServer::Stop() { |
if (!process_handle_) |
return true; |
+#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. |
bool ret = base::WaitForSingleProcess(process_handle_, base::TimeDelta()); |
- if (!ret) |
+ if (!ret) { |
ret = base::KillProcess(process_handle_, 1, true); |
+ } |
if (ret) { |
base::CloseProcessHandle(process_handle_); |