Package: procps Version: 1:3.3.3-3 Severity: normal File: /usr/bin/pgrep Dear Maintainer,
the manual page states that in case of a syntax error, pgrep / pkill with return with an exit status of 2. This is useful to distinguish between proper operation (but no match found) and incorrect usage. However, the actual behaviour differs from that. pgrep / pkill return with an exit code of 1 in case of a syntax error: === Begin === sascha.silbe@mimosa:~$ pgrep --foobar foobar ; echo $? pgrep: unrecognized option '--foobar' Usage: pgrep [options] <pattern> Options: -c, --count count of matching processes -d, --delimeter <string> specify output delimeter -l, --list-name list PID and process name -v, --inverse negates the matching -f, --full use full process name to match -g, --pgroup <id,...> match listed process group IDs -G, --group <gid,...> match real group IDs -n, --newest select most recently started -o, --oldest select least recently started -P, --parent <ppid,...> match only childs of given parent -s, --session <sid,...> match session IDs -t, --terminal <tty,...> match by controlling terminal -u, --euid <id,...> match by effective IDs -U, --uid <id,...> match by real IDs -x, --exact match exectly with command name -F, --pidfile <file> read PIDs from file -L, --logpidfile fail if PID file is not locked -h, --help display this help and exit -V, --version output version information and exit For more details see pgrep(1). 1 sascha.silbe@mimosa:~$ pkill --foobar foobar ; echo $? pkill: unrecognized option '--foobar' Usage: pkill [options] <pattern> Options: -<sig>, --signal <sig> signal to send (either number or name) -e, --echo display what is killed -f, --full use full process name to match -g, --pgroup <id,...> match listed process group IDs -G, --group <gid,...> match real group IDs -n, --newest select most recently started -o, --oldest select least recently started -P, --parent <ppid,...> match only childs of given parent -s, --session <sid,...> match session IDs -t, --terminal <tty,...> match by controlling terminal -u, --euid <id,...> match by effective IDs -U, --uid <id,...> match by real IDs -x, --exact match exectly with command name -F, --pidfile <file> read PIDs from file -L, --logpidfile fail if PID file is not locked -h, --help display this help and exit -V, --version output version information and exit For more details see pgrep(1). 1 === End === The latest version in jessie and sid (2:3.3.9-9) is still affected. This was apparently fixed upstream in procps 3.2.8 (released 2009), got broken again in procps-ng 3.3.2 (released 2012) and should be fixed again in procps-ng 3.3.10 (released 2014). Kind regards, Sascha -- System Information: Debian Release: 7.8 APT prefers oldstable APT policy: (500, 'oldstable'), (1, 'experimental') Architecture: armel (armv7l) Kernel: Linux 3.0.19-mimosa-8-01603-g1b85fba (PREEMPT) Locale: LANG=en_GB, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages procps depends on: ii initscripts 2.88dsf-41+deb7u1 ii libc6 2.13-38+deb7u8 ii libgcc1 1:4.7.2-5 ii libncurses5 5.9-10 ii libncursesw5 5.9-10 ii libprocps0 1:3.3.3-3 ii libtinfo5 5.9-10 ii lsb-base 4.1+Debian8+deb7u1 Versions of packages procps recommends: ii psmisc 22.19-1+deb7u1 procps suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org