Package: procps Version: 2:3.3.14-1 Severity: normal Tags: upstream Dear Maintainer,
I just upgraded procps from 2:3.3.12-4 to 2:3.3.14-1 and my scripting started to produce unexpected and (in my case) pointless messages on stderr, because apparently I like to do the following: | $ pgrep "something|otherthing" | 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. | $ This is a regression, and I seem to have no reasonable workaround: My pattern is indeed a (posix extended) regex, which tends to be longer than the string matched, and thus can easily be longer than 15 chars. There might legitimately be no matching process running. I mustn't match on the whole command line, as that would match, for example, "/usr/local/bin/retry something". I don't want to blindly throw away stderr, in case there ever are actual errors. So please make that text go away, or at least give me a way to disable it. </bugreport> Looking at the code in pgrep.c shows the following condition: > if ((!matches) && (!opt_full) && opt_pattern && (strlen(opt_pattern) > 15)) > xwarnx(_("pattern that.... My solution/hack would probably be to just add a > && (strchr(opt_pattern,'[') != NULL) there, allowing me to silence the warning by doing $ pgrep "s[o]mething|otherthing" and if neccessary blame people for not testing regexes. But I'd be fine with $ pgrep --i-know-about-the-length-restriction-shut-up-already "something|otherthing" too, whatever you/upstream consider reasonable. ;) If you decide on a fix and want it implemented or a patch you want tested, please holler, I'd be happy to help. Thanks for maintaining procps, regards, Jan -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (650, 'testing-debug'), (550, 'unstable-debug'), (550, 'unstable'), (10, 'experimental-debug'), (10, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=C.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages procps depends on: ii init-system-helpers 1.51 ii libc6 2.27-3 ii libncurses5 6.1-1 ii libncursesw5 6.1-1 ii libprocps6 2:3.3.14-1 ii libtinfo5 6.1-1 ii lsb-base 9.20170808 Versions of packages procps recommends: ii psmisc 23.1-1 procps suggests no packages. -- no debconf information
signature.asc
Description: PGP signature