Terminal(teletype?) detection implementation is wrong
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cli, operating-systems
Research direction
Start by tracing terminal detection used by pgrep and pidof, focusing on the /proc/{pid}/fd scan described in the issue. Reproduce the tty1 example in normal user mode and compare it with privileged mode. Done means terminal detection returns the expected process for pgrep and pidof without relying on inaccessible file descriptors.
Written by the indexing model from the issue text.
Description
The current implementation relies on scanning /proc/{pid}/fd, which works well in privileged mode because all fd's are accessible.
But the result is incorrect when used in normal user mode. For example:
❯ pgrep -t tty1
2384
❯ cargo run -q pgrep -t tty1
(*empty here)
And affects the following commands
pgreppidofpkill(in future)
- Dominant language
- Rust
- Stars
- 116
- Forks
- 38
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 14
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.
More from uutils/procps
-
hugetop
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
w
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100