diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-06-02 05:44:28 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-06-02 05:44:28 +0000 |
commit | 1e2018359cc105bc903d017b1eea4a55603eec86 (patch) | |
tree | 523064d961336d608215987137eeb46bdf0c6c65 /lib | |
parent | 19e779357f7cd0f326d00b06db357a45e80d8698 (diff) |
Committed the wrong version (an earlier try) of the KERN_FILE2 vs
rthreads fix. Update to the correct one.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkvm/kvm_file2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_file2.c b/lib/libkvm/kvm_file2.c index 92db2ffef6c..570e5a4573c 100644 --- a/lib/libkvm/kvm_file2.c +++ b/lib/libkvm/kvm_file2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_file2.c,v 1.24 2012/05/01 03:43:23 guenther Exp $ */ +/* $OpenBSD: kvm_file2.c,v 1.25 2012/06/02 05:44:27 guenther Exp $ */ /* * Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com> @@ -316,7 +316,7 @@ kvm_deadfile2_byid(kvm_t *kd, int op, int arg, size_t esize, int *cnt) } /* skip system, embryonic and undead processes */ - if ((proc.p_flag & P_SYSTEM) || + if ((proc.p_flag & P_SYSTEM) || (proc.p_flag & P_THREAD) || proc.p_stat == SIDL || proc.p_stat == SZOMB) continue; if (op == KERN_FILE_BYPID) { @@ -339,6 +339,8 @@ kvm_deadfile2_byid(kvm_t *kd, int op, int arg, size_t esize, int *cnt) proc.p_p); goto cleanup; } + if (process.ps_flags & PS_EXITING) + continue; proc.p_p = &process; if ((proc.p_flag & P_THREAD) == 0) pid = proc.p_pid; |