diff options
author | kib <kib@FreeBSD.org> | 2012-06-30 16:36:22 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-06-30 16:36:22 +0000 |
commit | 5199a9a8a650a834b790fb045c60f0b09097038c (patch) | |
tree | 82afc9c0b258206585d8c4e4ac0e1e974d0a680a | |
parent | 80eade56fc28a6f511396429f3aea2fa4782c9d9 (diff) | |
download | FreeBSD-src-5199a9a8a650a834b790fb045c60f0b09097038c.zip FreeBSD-src-5199a9a8a650a834b790fb045c60f0b09097038c.tar.gz |
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
-rw-r--r-- | usr.bin/killall/killall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index cc91eb4..83e829a 100644 --- a/usr.bin/killall/killall.c +++ b/usr.bin/killall/killall.c @@ -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)); |