You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original pgrep shows an error message if the specified pattern is longer than 15 chars whereas our pgrep doesn't.
$ pgrep 123456789012345
$ pgrep 1234567890123456
pgrep: pattern that searches for process name longer than 15 characters will result in zero matches
Try `pgrep -f' option to match against the complete command line.
$ cargo run pgrep 123456789012345
$ cargo run pgrep 1234567890123456
The text was updated successfully, but these errors were encountered:
Does this need to be made compatible with GNU as well? Maybe it would be better to set an extra flag (such as --extended-pattern) as an extension of the uutils implementation?
Hm, it looks like this error only shows up if there is no match. If there is a match, there is no such error message:
$ pgrep pool_workqueue_release
3
So this means an extra flag doesn't make much sense.
It's a low-prio bug. I'm not sure whether we should fix it in our code or adapt the procps test suite accordingly when we run their test suite against our code.
cakebaker
changed the title
pgrep: should show an error message if pattern is longer than 15 chars
pgrep: should show an error message if pattern is longer than 15 chars and there's no match
Jul 15, 2024
The original
pgrep
shows an error message if the specified pattern is longer than 15 chars whereas ourpgrep
doesn't.The text was updated successfully, but these errors were encountered: