Skip to content

Terminal(teletype?) detection implementation is wrong #179

Description

@Krysztal112233

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions