Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal(teletype?) detection implementation is wrong #179

Open
Krysztal112233 opened this issue Aug 14, 2024 · 0 comments
Open

Terminal(teletype?) detection implementation is wrong #179

Krysztal112233 opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Krysztal112233
Copy link
Collaborator

Krysztal112233 commented Aug 14, 2024

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

  • pgrep
  • pidof
  • pkill (in future)
@Krysztal112233 Krysztal112233 added the bug Something isn't working label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant