Skip to content

tac: skip mmap for non-regular files to match GNU 9.9 behavior#10799

Draft
ChrisDryden wants to merge 1 commit intouutils:mainfrom
ChrisDryden:tac-non-regular-files
Draft

tac: skip mmap for non-regular files to match GNU 9.9 behavior#10799
ChrisDryden wants to merge 1 commit intouutils:mainfrom
ChrisDryden:tac-non-regular-files

Conversation

@ChrisDryden
Copy link
Collaborator

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

@ChrisDryden
Copy link
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

@ChrisDryden ChrisDryden marked this pull request as draft February 7, 2026 20:15
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.

tac: tac /dev/zero should not finish

1 participant