Go to file
Greg Bedwell 7f68a71669 Fix rename() sometimes failing if another process uses openFileForRead()
On Windows, fs::rename() could fail is another process was reading the
file at the same time using fs::openFileForRead().  In most cases the user
wouldn't notice as fs::rename() will continue to retry for 2000ms.  Typically
this is enough for the read to complete and a retry to succeed, but if the
disk is being it too hard then the response time might be longer than the
retry time and the rename would fail with a permission error.

Add FILE_SHARE_DELETE to the sharing flags for CreateFileW() in
fs::openFileForRead() and try ReplaceFileW() prior to MoveFileExW()
in fs::rename().

Based on an initial patch by Edd Dawson!

Differential Revision: http://reviews.llvm.org/D13647

llvm-svn: 250046
2015-10-12 15:11:47 +00:00
clang [Driver] Remove `else` after `return` 2015-10-12 14:32:57 +00:00
clang-tools-extra Added documentation for misc-throw-by-value-catch-by-reference. 2015-10-12 12:57:55 +00:00
compiler-rt Revert "builtins: enable builtins build for MSVC" 2015-10-11 22:30:10 +00:00
debuginfo-tests
libclc integer: remove explicit casts from _MIN definitions 2015-10-06 19:12:12 +00:00
libcxx [Darwin] Reworking r250003 to use lit.util.capture instead of subprocess. 2015-10-12 02:54:30 +00:00
libcxxabi Fix incorrect parsing of arguments for nested functions. Reviewed as http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch. 2015-10-08 03:02:09 +00:00
libunwind unwind: Allow the building of libunwind for MIPS. 2015-09-26 18:26:01 +00:00
lld [ELF2][mips] Support R_MIPS_32 relocation 2015-10-12 15:10:02 +00:00
lldb Switch threading mode for tests on Windows when there are lots of cores. 2015-10-12 14:46:57 +00:00
llgo [llgo] irgen: always use TargetMachine's data layout 2015-09-25 06:28:14 +00:00
llvm Fix rename() sometimes failing if another process uses openFileForRead() 2015-10-12 15:11:47 +00:00
openmp [OMPT] Reduce overhead of OMPT 2015-10-09 17:42:52 +00:00
polly ScopInfo: Allow simple 'AddRec * Parameter' products in delinearization 2015-10-12 08:02:30 +00:00