[Lldb-commits] [lldb] r246682 - When redirecting stdio, use FILE_SHARE_DELETE.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 2 10:59:20 PDT 2015
Author: zturner
Date: Wed Sep 2 12:59:19 2015
New Revision: 246682
URL: http://llvm.org/viewvc/llvm-project?rev=246682&view=rev
Log:
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.
Modified:
lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp
Modified: lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp?rev=246682&r1=246681&r2=246682&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp Wed Sep 2 12:59:19 2015
@@ -83,7 +83,7 @@ ProcessLauncherWindows::GetStdioHandle(c
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)
More information about the lldb-commits
mailing list