From: Craig Small Date: Wed, 10 Feb 2010 11:00:26 +0000 (+0000) Subject: skill: fix too greedy option parser X-Git-Tag: v3.3.2~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=057f8955299fb89363b0dfbeab5a1641bff24f45;p=procps-ng skill: fix too greedy option parser Patch based on submitted patch by Yoshio Nakamura A patch from Debian. Bug-Debian: http://bugs.debian.org/331419 Bug-Debian: http://bugs.debian.org/569030 Backported-by: Sami Kerola --- diff --git a/skill.c b/skill.c index c0afe18a..66f042e2 100644 --- a/skill.c +++ b/skill.c @@ -462,6 +462,8 @@ selection_collection: switch(force){ /* fall through each data type */ default: skillsnice_usage(); case 0: /* not forced */ + if (argptr && argptr[0] == '-') /* its the next argument not a parameter */ + continue; case 't': if(argc){ struct stat sbuf;