Chromium Code Reviews| 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_); |