svn commit: r274471 - stable/10/usr.bin/killall
Steven Hartland
smh at FreeBSD.org
Thu Nov 13 16:40:16 UTC 2014
Author: smh
Date: Thu Nov 13 16:40:15 2014
New Revision: 274471
URL: https://svnweb.freebsd.org/changeset/base/274471
Log:
MFC r260800:
Fix a regression introduced in r237618
MFC r260801:
Re-work r260800 to include other signals which start with 'I'
such as ILL, INFO etc.
Sponsored by: Multiplay
Modified:
stable/10/usr.bin/killall/killall.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.bin/killall/killall.c
==============================================================================
--- stable/10/usr.bin/killall/killall.c Thu Nov 13 14:46:33 2014 (r274470)
+++ stable/10/usr.bin/killall/killall.c Thu Nov 13 16:40:15 2014 (r274471)
@@ -90,6 +90,7 @@ nosig(char *name)
int
main(int ac, char **av)
{
+ char **saved_av;
struct kinfo_proc *procs, *newprocs;
struct stat sb;
struct passwd *pw;
@@ -144,9 +145,6 @@ main(int ac, char **av)
if (**av == '-') {
++*av;
switch (**av) {
- case 'I':
- Iflag = 1;
- break;
case 'j':
++*av;
if (**av == '\0') {
@@ -214,6 +212,7 @@ main(int ac, char **av)
zflag++;
break;
default:
+ saved_av = av;
if (isalpha((unsigned char)**av)) {
if (strncasecmp(*av, "SIG", 3) == 0)
*av += 3;
@@ -223,8 +222,14 @@ main(int ac, char **av)
sig = p - sys_signame;
break;
}
- if (!sig)
- nosig(*av);
+ if (!sig) {
+ if (**saved_av == 'I') {
+ av = saved_av;
+ Iflag = 1;
+ break;
+ } else
+ nosig(*av);
+ }
} else if (isdigit((unsigned char)**av)) {
sig = strtol(*av, &ep, 10);
if (!*av || *ep)
More information about the svn-src-all
mailing list