tail /dev/null --pid 0 --follow should open /dev/null with O_NONBLOCK
Open
Beginner friendly
Nobody has claimed this yet.
U - tail
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
$ strace -f -e trace=openat tail /dev/null --pid 0 --follow
...
[pid 5801] openat(AT_FDCWD, "/dev/null", O_RDONLY|O_CLOEXEC) = 6
it should be
$ strace -f -e trace=open,openat '/home/a/bin/gnu9.11/tail' /dev/null --pid 0 --follow
openat(AT_FDCWD, "/dev/null", O_RDONLY|O_NONBLOCK) = 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Rust implementation of the tail command and the code that opens the followed file. Reproduce the issue with tail /dev/null --pid 0 --follow under strace, then verify that the open call includes O_NONBLOCK and that the command still follows correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100