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
This commit is contained in:
Konstantin Belousov 2012-06-30 16:36:22 +00:00
parent 407e615c68
commit c517bc1502
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237847

View file

@ -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));