| Index: net/test/spawned_test_server/local_test_server_win.cc
|
| diff --git a/net/test/spawned_test_server/local_test_server_win.cc b/net/test/spawned_test_server/local_test_server_win.cc
|
| index 71e1f7e70af1b5ea48d5fdb43bbcbfb91fe53810..0476b907caffb879ab100bd3d8199289227fc02f 100644
|
| --- a/net/test/spawned_test_server/local_test_server_win.cc
|
| +++ b/net/test/spawned_test_server/local_test_server_win.cc
|
| @@ -101,8 +101,9 @@ bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) {
|
| child_write_fd_.Set(child_write);
|
|
|
| // Have the child inherit the write half.
|
| - if (!SetHandleInformation(child_write, HANDLE_FLAG_INHERIT,
|
| - HANDLE_FLAG_INHERIT)) {
|
| + if (!::DuplicateHandle(::GetCurrentProcess(), child_write,
|
| + ::GetCurrentProcess(), &child_write, 0, TRUE,
|
| + DUPLICATE_SAME_ACCESS)) {
|
| PLOG(ERROR) << "Failed to enable pipe inheritance";
|
| return false;
|
| }
|
| @@ -125,9 +126,11 @@ bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) {
|
| process_ = base::LaunchProcess(python_command, launch_options);
|
| if (!process_.IsValid()) {
|
| LOG(ERROR) << "Failed to launch " << python_command.GetCommandLineString();
|
| + ::CloseHandle(child_write);
|
| return false;
|
| }
|
|
|
| + ::CloseHandle(child_write);
|
| return true;
|
| }
|
|
|
|
|