mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 07:14:53 +00:00
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
This commit is contained in:
parent
7f6d84230c
commit
24ff48476b
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user