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));
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to