Repository navigation
fix(read-write): handle NetBSD fd limits - #768
Merged
Merged
Conversation
NetBSD creates static /dev/fd entries only for descriptors 0-63. Use a private hard link in the system temporary location for higher descriptors and verify its inode before SQLite opens it. Remove the link after close or a construction failure. Match the offending path in the symlink test to accept NetBSD's EFTYPE wording. Fixes tox-dev#766
Reuse the database fixture across fallback checks and place fixtures below their callers.
Windows and Android skip the descriptor fallback checks but still count their unreachable paths toward coverage. Share the POSIX hard-link capability between the skip gate and coverage exclusions.
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.
NetBSD's default
/dev/fdcontains entries 0-63. Opening SQLite through a higher database descriptor fails. This fixes #766 by using a hard link in a private directory when the descriptor path is missing.The link must match the inode opened without following symlinks. Keep it until SQLite closes, then remove it; construction failures remove it as well. Use the system temporary location so users with write access to the lock directory cannot replace the alias directory. The fallback requires the temporary location and database to share a filesystem.
I could not run this on native NetBSD.