You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release/6.0] SafeFileHandle.Unix: don't DeleteOnClose when lock is not successful. (#60112)
* SafeFileHandle.Unix: don't DeleteOnClose when lock is not succesful.
In #55153 DeleteOnClose handling
moved from FileStream to SafeFileHandle.
This unintentionally caused DeleteOnClose to be applied even when
FileShare locking fails. As on Windows, DeleteOnClose should not take
effect when sharing prevents the file from being opened.
This also swaps the order of unlink and LOCK_UN in Dispose as it was
prior to #55153.
Either order should be fine.
* test: add ConditionalFact IsFileLockingEnabled
0 commit comments