From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 16:36:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7079E1065670; Sat, 30 Jun 2012 16:36:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AD978FC08; Sat, 30 Jun 2012 16:36:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5UGaNLH029815; Sat, 30 Jun 2012 16:36:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UGaNCB029813; Sat, 30 Jun 2012 16:36:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206301636.q5UGaNCB029813@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Jun 2012 16:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237847 - head/usr.bin/killall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2012 16:36:23 -0000 Author: kib Date: Sat Jun 30 16:36:22 2012 New Revision: 237847 URL: http://svn.freebsd.org/changeset/base/237847 Log: Once in a month, when the moon is full, killall mistakenly considers living process as a zombie and refuses to kill it. The cause is that the code masks ki_stat with SZOMB to compare with SZOMB, but ki_stat is not a mask. Possibly reported by: cperciva MFC after: 3 days Modified: head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Sat Jun 30 16:23:08 2012 (r237846) +++ head/usr.bin/killall/killall.c Sat Jun 30 16:36:22 2012 (r237847) @@ -319,7 +319,7 @@ main(int ac, char **av) mypid = getpid(); for (i = 0; i < nprocs; i++) { - if ((procs[i].ki_stat & SZOMB) == SZOMB && !zflag) + if (procs[i].ki_stat == SZOMB && !zflag) continue; thispid = procs[i].ki_pid; strlcpy(thiscmd, procs[i].ki_comm, sizeof(thiscmd));