This is an archive of the discontinued LLVM Phabricator instance.

[Support, Windows] Retry rename() when MoveFileExW returns ERROR_SHARING_VIOLATION
Needs ReviewPublic

Authored by iid_iunknown on Sep 1 2017, 1:55 PM.
This revision needs review, but all specified reviewers are disabled or inactive.

Details

Reviewers
espindola
Summary

Currently rename() retries MoveFileExW if it returns ERROR_ACCESS_DENIED.
MoveFileExW may also fail with ERROR_SHARING_VIOLATION when the file is opened by some other app.

This patch makes rename() aware of ERROR_SHARING_VIOLATION when moving the file, so that it does
not stop its attempts to move the file if this error is encountered.

Diff Detail

Repository
rL LLVM

Event Timeline

iid_iunknown created this revision.Sep 1 2017, 1:55 PM

A gentle reminder about this patch.

rnk added a subscriber: rnk.Oct 9 2017, 12:45 PM

You will need to rebase this past rL315222.

espindola edited reviewers, added: espindola; removed: rafael.Mar 15 2018, 9:15 AM