When redirecting stdio, use FILE_SHARE_DELETE.
Some tests were failing because the test would try to delete the
file before inferior had exited, but on Windows this will fail by
default unless you specify FILE_SHARE_DELETE when opening the file.
Can't think of a good reason not to do this, so here it is.
llvm-svn: 246682
diff --git a/lldb/source/Host/windows/ProcessLauncherWindows.cpp b/lldb/source/Host/windows/ProcessLauncherWindows.cpp
index a09906d..355dd40 100644
--- a/lldb/source/Host/windows/ProcessLauncherWindows.cpp
+++ b/lldb/source/Host/windows/ProcessLauncherWindows.cpp
@@ -83,7 +83,7 @@
const char *path = action->GetPath();
DWORD access = 0;
- DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE;
+ DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
DWORD create = 0;
DWORD flags = 0;
if (fd == STDIN_FILENO)