Skip to content

Terminal(teletype?) detection implementation is wrong #179

Open
@Krysztal112233

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)

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