Files
procps/tests
Tuomas Tynkkynen 43f7412e74 process_matcher: Fix accidentally matching against pid
Currently pgrep/pkill without -x/-f flags is matching based on the first
15 characters of /proc/<pid>/stat, which actually contains something like
"1116878 (cat) R" thus matching the process id when it should just match
on the name.

This has probably come from misunderstanding the comment from manpage:

> The process name used for matching is limited to the 15 characters
> present in the output of /proc/pid/stat.

... which doesn't mean pgrep/pkill is literally matching on 15
characters of /proc/<pid>/stat but that the process name in that file is
truncated to 15 characters.

Fixes #307
2025-02-19 01:48:41 +02:00
..
2025-01-18 15:11:23 +02:00