Open
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
pgrep
pidof
pkill
(in future)