Followup-For: Bug #413383 Package: procps Version: 1:3.2.7-3
My earlier patch for pgrep.c in package procps (see above) should not be applied. In pgrep.c , the function usage() should always return EXIT_USAGE. I think the reason why the function usage() takes a parameter is so that if the right parameter was passed, the usage for pgrep/pkill would be shown, and then it would exit with EXIT_SUCCESS, else it would exit with return code EXIT_USAGE. However, pgrep/pkill does not take a parameter to list how to use the command, so usage() should always exit with EXIT_USAGE. New patch attached. It hardcodes EXIT_USAGE as the return code in usage() , and ignores the parameter that's passed to usage() . -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-k7 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages procps depends on: ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries ii libncurses5 5.5-5 Shared libraries for terminal hand ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip Versions of packages procps recommends: ii psmisc 22.3-1 Utilities that use the proc filesy -- no debconf information
diff -ur procps-3.2.7/pgrep.c procps-FIX/pgrep.c --- procps-3.2.7/pgrep.c 2006-06-24 17:39:25.000000000 -0700 +++ procps-FIX/pgrep.c 2007-05-22 09:57:41.000000000 -0700 @@ -81,7 +81,7 @@ fprintf (stderr, "[-n|-o] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST]\n" "\t[-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] " "[PATTERN]\n"); - exit (opt == '?' ? EXIT_SUCCESS : EXIT_USAGE); + exit (EXIT_USAGE); }

