Date: Fri, 17 Jan 2014 03:30:25 +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: r260800 - head/usr.bin/killall Message-ID: <201401170330.s0H3UP5t052870@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: csjp Date: Fri Jan 17 03:30:24 2014 New Revision: 260800 URL: http://svnweb.freebsd.org/changeset/base/260800 Log: fix a regression introduced in r237618 that would result in killall confusing killall -INT with killall -I (interactive confirmation) which resulted in the wrong signal (TERM) being delivered to the process(s). Discussed with: 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 01:23:31 2014 (r260799) +++ head/usr.bin/killall/killall.c Fri Jan 17 03:30:24 2014 (r260800) @@ -144,9 +144,6 @@ main(int ac, char **av) if (**av == '-') { ++*av; switch (**av) { - case 'I': - Iflag = 1; - break; case 'j': ++*av; if (**av == '\0') { @@ -213,6 +210,15 @@ 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: if (isalpha((unsigned char)**av)) { if (strncasecmp(*av, "SIG", 3) == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401170330.s0H3UP5t052870>