summaryrefslogtreecommitdiff
path: root/lib/Support/Windows/Path.inc
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-17 19:44:07 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-17 19:44:07 +0000
commit24ff48476b663cb334afcb062a49c342e341eb92 (patch)
tree6a84d154740d09fd2d348dda143de2bfec1391f2 /lib/Support/Windows/Path.inc
parent7f6d84230c0e21b4f841a0b28a1e494fe327d2b7 (diff)
downloadllvm-24ff48476b663cb334afcb062a49c342e341eb92.tar.gz
llvm-24ff48476b663cb334afcb062a49c342e341eb92.tar.bz2
llvm-24ff48476b663cb334afcb062a49c342e341eb92.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Path.inc')
-rw-r--r--lib/Support/Windows/Path.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc
index 1da60d6711..d51332ef81 100644
--- a/lib/Support/Windows/Path.inc
+++ b/lib/Support/Windows/Path.inc
@@ -1050,7 +1050,7 @@ error_code openFileForRead(const Twine &Name, int &ResultFD) {
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());