Index: util/win/process_info_test.cc |
diff --git a/util/win/process_info_test.cc b/util/win/process_info_test.cc |
index a6f9dc1cebdc8b6068d5397576946212eae3d8de..7bf0f4efff96cc9ccf14274435f374101bd58e84 100644 |
--- a/util/win/process_info_test.cc |
+++ b/util/win/process_info_test.cc |
@@ -538,14 +538,16 @@ TEST(ProcessInfo, Handles) { |
ASSERT_TRUE(file.is_valid()); |
SECURITY_ATTRIBUTES security_attributes = {0}; |
+ security_attributes.nLength = sizeof(security_attributes); |
Mark Mentovai
2015/11/05 19:42:01
I originally thought that this would be the proble
|
security_attributes.bInheritHandle = true; |
- ScopedFileHandle inherited_file(CreateFile(L"CONOUT$", |
- GENERIC_WRITE, |
- 0, |
- &security_attributes, |
- OPEN_EXISTING, |
- FILE_ATTRIBUTE_NORMAL, |
- nullptr)); |
+ ScopedFileHandle inherited_file(CreateFile( |
+ temp_dir.path().Append(FILE_PATH_LITERAL("inheritable")).value().c_str(), |
+ GENERIC_WRITE, |
+ 0, |
+ &security_attributes, |
+ CREATE_NEW, |
+ FILE_ATTRIBUTE_NORMAL, |
+ nullptr)); |
ASSERT_TRUE(inherited_file.is_valid()); |
HKEY key; |