From: Craig Small Date: Sun, 20 May 2018 10:46:55 +0000 (+1000) Subject: killall: change to getopt_long X-Git-Tag: v23.2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b769da1626044f97a689c1665270595f36f878e7;p=psmisc killall: change to getopt_long with getopt_long_only -ve fails because its not sure what the -v is for --version or --verbose. Changing to the non-_only version means it doesn't try to expand the options to long options. References: psmisc/psmisc#12 --- diff --git a/ChangeLog b/ChangeLog index 087c947..6d5eaaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Changes in 23.2 =============== * killall: look at all namespaces by default * killall: Fix -INT option parsing #11 + * killall: change to getopt_long without _only #12 Changes in 23.1 =============== * killall: Remove debug output Debian: #864753 diff --git a/src/killall.c b/src/killall.c index 5fee135..21c1090 100644 --- a/src/killall.c +++ b/src/killall.c @@ -855,9 +855,9 @@ main (int argc, char **argv) opterr = 0; #ifdef WITH_SELINUX - while ( (optc = getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) { + while ( (optc = getopt_long(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) { #else - while ( (optc = getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) { + while ( (optc = getopt_long(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) { #endif switch (optc) { case 'e':