Repository navigation
🐛 fix(unix): reopen a denied lock at the pinned path - #889
Merged
Merged
Conversation
The coverage pragma sits on the def line as in the module's other multi-line tests, the captured os.open is Final as the sibling's lstat is, and the comment keeps only the why. The fragment names the bug before the fix, as the other Fixed entries do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
FileLockon a relative path whose lock file another account owns, so this process can only read it, could wait until its timeout instead of raisingPermissionError, or probe an unrelated file, when another thread changed the working directory during the acquisition. 🧭 The read-only reopen that #835 added to tell a missingflockfrom a denied write resolved the caller's relative spelling of the path against the working directory of the moment, while #841 pins a canonical path for every other open in the acquisition.The Unix backend now reopens through the same pinned path as its create and open attempts, so one acquisition names one file from start to finish. With the default
timeout=-1the old behaviour was an unbounded wait, and aflock-less filesystem under the new working directory could swap the instance toSoftFileLockwhile the pinned file sat on one that hasflock.