Skip to content

Conversation

@CasualPokePlayer
Copy link
Contributor

Untested, should prevent situations such as #3580 from occurring.

@endrift
Copy link
Member

endrift commented Oct 20, 2025

Two suggestions:

  1. Let's put this in the map function if it's MAP_WRITE
  2. Check the advisory lock on Unix while when opening

@CasualPokePlayer
Copy link
Contributor Author

  1. I assume this would end up meaning we should unlock it at unmap. Which then leads to the question, how do we know if the unmap is with a read-only mapping or a writable mapping? I would guess each mapping would need to be tracked, for both Windows and POSIX platforms (Granted, the API seems inconsistent in whether or not it expects multiple mappings to occur for the same VFile, the Windows code implies that is possibly expected given its HandleMappingList vector, although the POSIX path with _POSIX_MAPPED_FILES undefined ends up having a writable member that's set on each _vfdMap call?)
  2. I assume this just means replacing F_SETLK with F_GETLK and such and responding accordingly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants