[llvm] r186530 - Add FILE_SHARE_WRITE to openFileForRead.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jul 17 12:44:07 PDT 2013
Author: rafael
Date: Wed Jul 17 14:44:07 2013
New Revision: 186530
URL: http://llvm.org/viewvc/llvm-project?rev=186530&view=rev
Log:
Add FILE_SHARE_WRITE to openFileForRead.
This should fix the windows bots. It looks like the failing tests are of the
form
prog1 > file
prog2 file
and prog2 fails trying to read the file. The best fix would probably be to close
stdout/stderr in prog1, but it was not the intention of 186511 to change this,
so just restore the old behavior for now.
Modified:
llvm/trunk/lib/Support/Windows/Path.inc
Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=186530&r1=186529&r2=186530&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Wed Jul 17 14:44:07 2013
@@ -1050,7 +1050,7 @@ error_code openFileForRead(const Twine &
return EC;
HANDLE H = ::CreateFileW(PathUTF16.begin(), GENERIC_READ,
- FILE_SHARE_READ, NULL,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (H == INVALID_HANDLE_VALUE) {
error_code EC = windows_error(::GetLastError());
More information about the llvm-commits
mailing list