Skip to content

feat: tail -f accessible#12

Merged
Charliechen114514 merged 3 commits into
mainfrom
feat/tail-follow
Jun 17, 2026
Merged

feat: tail -f accessible#12
Charliechen114514 merged 3 commits into
mainfrom
feat/tail-follow

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

No description provided.

Descriptor-based follow (-f) with stat polling and retry (-F) that reopens
rotated or truncated files. The open descriptor is the source of truth:
fstat() detects in-place truncation, read() drains to EOF, and -F compares
pathname dev/ino to detect rotation, draining the old fd before swapping in
a pending replacement. Multi-file follow uses a 64 KiB quantum per sweep to
prevent starvation. SIGINT/SIGTERM are caught via sigaction with an RAII
guard restoring prior handlers (multi-call binary). nanosleep+EINTR polls;
inotify deferred. Add unique_fd RAII to io.hpp.

381 GTest + integration suite green; size-opt 410 KB (+4).
@Charliechen114514

Copy link
Copy Markdown
Member Author

测试设计的有问题,要修复

@Charliechen114514 Charliechen114514 merged commit 100fa94 into main Jun 17, 2026
8 checks passed
@Charliechen114514 Charliechen114514 deleted the feat/tail-follow branch June 17, 2026 12:27
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.

1 participant