Closed
Conversation
Expand KBOX_LOW_FD_MAX from 1024 to 32768 so that low_fds[] covers the entire range below KBOX_FD_BASE. Previously, dup2/dup3 targeting FDs in the gap returned EBADF because fd_lookup() returned NULL for that range. This is Option A from issue sysprog21#8: a simple constant change with ~1MB additional memory per instance. Update unit tests to remove gap-expects-failure assertions and add coverage for FDs 1023, 10000, and 32767. Resolves sysprog21#8 Change-Id: I6c685c3ff473a9b393dbb3f373886abdaef5d7cd
Contributor
|
Before submitting pull requests, you should first discuss them in #8 , addressing considerations and known limitations in advance. |
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.
Expand KBOX_LOW_FD_MAX from 1024 to 32768 so that
low_fds[] covers the entire range below KBOX_FD_BASE. Previously, dup2/dup3 targeting FDs in the gap returned EBADF because fd_lookup() returned NULL for that range.
This is Option A from issue #8: a simple constant change with ~1MB additional memory per instance.
Update unit tests to remove gap-expects-failure assertions and add coverage for FDs 1023, 10000, and 32767.
Resolves #8
Change-Id: I6c685c3ff473a9b393dbb3f373886abdaef5d7cd
Summary by cubic
Expand
KBOX_LOW_FD_MAXto 32768 to cover all FDs belowKBOX_FD_BASEand close the low-FD gap. Fixes EBADF fromdup2/dup3to FDs 1024-32767 (Option A in #8).fd_lookup()now maps 0-32767; ~1MB extra memory per instance.Written for commit ab90366. Summary will update on new commits.