Date: Fri, 17 Jan 2014 04:16:39 +0000 (UTC) From: "Christian S.J. Peron" <csjp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260801 - head/usr.bin/killall Message-ID: <201401170416.s0H4GdUI070000@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: csjp Date: Fri Jan 17 04:16:39 2014 New Revision: 260801 URL: http://svnweb.freebsd.org/changeset/base/260801 Log: Re-work r260800 to include other signals which start with 'I' such as ILL, INFO etc.. Submitted by: delphij MFC after: 2 weeks Modified: head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Fri Jan 17 03:30:24 2014 (r260800) +++ head/usr.bin/killall/killall.c Fri Jan 17 04:16:39 2014 (r260801) @@ -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; @@ -210,16 +211,8 @@ main(int ac, char **av) case 'z': zflag++; break; - case 'I': - /* - * NB: do not confuse -INT with -I - */ - if (strncmp(*av, "INT", 3) != 0) { - Iflag = 1; - break; - } - /* FALLTHROUGH */ default: + saved_av = av; if (isalpha((unsigned char)**av)) { if (strncasecmp(*av, "SIG", 3) == 0) *av += 3; @@ -229,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401170416.s0H4GdUI070000>