tac: skip mmap for non-regular files to match GNU 9.9 behavior#10799
Draft
ChrisDryden wants to merge 1 commit intouutils:mainfrom
Draft
tac: skip mmap for non-regular files to match GNU 9.9 behavior#10799ChrisDryden wants to merge 1 commit intouutils:mainfrom
ChrisDryden wants to merge 1 commit intouutils:mainfrom
Conversation
Collaborator
Author
|
Would probably be better to wait until the tac flakiness fix is merged to review this one, hard to tell if I have a test case failing or whether this is failing on a platform |
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.
There are two issues relating to handling special linux cases in tac. The first is that the file reader does not read in buffers and the second is that the mmap will fail unexpectedly for special case files on linux. This adds a bunch of tests to validate that the behavior matches. This should also have a performance improvement in the use case of these special files because if its not a file it will skip the expensive mmap system calls.
Fixes: #9591