pgrep: Remove >15 warning

As comm length can be longer than 15 characters with newer kernels, it
doesn't make sense to have a warning when you make the match string
longer than this.

As a side-effect, it removes the false-positive you got when you used
long regex matches (see issue #92 )

References:
 commit 2cfdbbe897
 procps-ng/procps#92
This commit is contained in:
Craig Small
2018-05-19 08:14:06 +10:00
parent 52dc8dcdea
commit c32ab58b94
2 changed files with 1 additions and 4 deletions

View File

@@ -653,10 +653,6 @@ static struct el * select_procs (int *num)
closeproc (ptp);
*num = matches;
if ((!matches) && (!opt_full) && opt_pattern && (strlen(opt_pattern) > 15))
xwarnx(_("pattern that searches for process name longer than 15 characters will result in zero matches\n"
"Try `%s -f' option to match against the complete command line."),
program_invocation_short_name);
return list;
}