<div dir="ltr">Does prog1 not terminate before prog2?<div><br></div><div>Anyway, I double-checked, and these flags are consistent with the default for regular open(), so this should bring us back to the behavior we had before splitting into openFileForRead().</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 17, 2013 at 3:44 PM, Rafael Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Wed Jul 17 14:44:07 2013<br>
New Revision: 186530<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=186530&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=186530&view=rev</a><br>
Log:<br>
Add FILE_SHARE_WRITE to openFileForRead.<br>
<br>
This should fix the windows bots. It looks like the failing tests are of the<br>
form<br>
<br>
prog1 > file<br>
prog2 file<br>
<br>
and prog2 fails trying to read the file. The best fix would probably be to close<br>
stdout/stderr in prog1, but it was not the intention of 186511 to change this,<br>
so just restore the old behavior for now.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Support/Windows/Path.inc<br>
<br>
Modified: llvm/trunk/lib/Support/Windows/Path.inc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=186530&r1=186529&r2=186530&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=186530&r1=186529&r2=186530&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Support/Windows/Path.inc (original)<br>
+++ llvm/trunk/lib/Support/Windows/Path.inc Wed Jul 17 14:44:07 2013<br>
@@ -1050,7 +1050,7 @@ error_code openFileForRead(const Twine &<br>
     return EC;<br>
<br>
   HANDLE H = ::CreateFileW(PathUTF16.begin(), GENERIC_READ,<br>
-                           FILE_SHARE_READ, NULL,<br>
+                           FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,<br>
                            OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);<br>
   if (H == INVALID_HANDLE_VALUE) {<br>
     error_code EC = windows_error(::GetLastError());<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>