]> granicus.if.org Git - procps-ng/commitdiff
skill: fix too greedy option parser
authorCraig Small <csmall@debian.org>
Wed, 10 Feb 2010 11:00:26 +0000 (11:00 +0000)
committerCraig Small <csmall@enc.com.au>
Sun, 18 Dec 2011 11:50:58 +0000 (22:50 +1100)
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 <kerolasa@iki.fi>
skill.c

diff --git a/skill.c b/skill.c
index c0afe18ad2b97fa7d0689fa73a351a9476e77e43..66f042e247b652099bb9ae9fb7b55b501e9240b2 100644 (file)
--- 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;