If skill was used with a signal number then it would intepret
the command line with last option interpreted twice. This often
confused the program so it just would end up killing nothing.
So this would work:
skill -t pts/0
This would not:
skill -9 -t pts/0
The kill path (in the same file) uses the same logic that has
been introduced here.
References: https://www.freelists.org/post/procps/skill-command-does-not-work-in-debian-7-releases
Signed-off-by: Craig Small <csmall@enc.com.au>
procps-ng-NEXT
----------------
* pgrep: don't crash with -a -w flags. Merge 33, Debian #768190
+ * skill: command line with signal number interpreted correctly
procps-ng-3.3.10
----------------
prino = snice_prio_option(&argc, argv);
else if (program == PROG_SKILL) {
signo = skill_sig_option(&argc, argv);
- if (-1 < signo)
+ if (-1 < signo) {
sig_or_pri = signo;
+ argc -= 1;
+ }
}
pid_count = 0;