diff options
author | kib <kib@FreeBSD.org> | 2010-02-27 15:32:49 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-02-27 15:32:49 +0000 |
commit | a8e7da4cf2e2bfee7fc1141b6a474fd9d39cb4f3 (patch) | |
tree | 6e24eba117be75e232557654c747476eef79e8ab | |
parent | 695f0b496cd001c4fb2b356b30b3da02d1c9dcfb (diff) | |
download | FreeBSD-src-a8e7da4cf2e2bfee7fc1141b6a474fd9d39cb4f3.zip FreeBSD-src-a8e7da4cf2e2bfee7fc1141b6a474fd9d39cb4f3.tar.gz |
For kinfo_proc in kp->ki_siglist, return the set of the signals pending
in the process queue when gathering information for the process, and set
of signals pending for the thread, when gathering information for the
thread. Previously, the sysctl returned a union of the process and some
arbitrary thread pending set for the process, and union of the process
and the thread pending set for the thread.
MFC after: 1 week
-rw-r--r-- | sys/kern/kern_proc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index f46856c..c41909d 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -828,9 +828,10 @@ fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp) } /* - * Fill in information that is thread specific. Must be called with p_slock - * locked. If 'preferthread' is set, overwrite certain process-related - * fields that are maintained for both threads and processes. + * Fill in information that is thread specific. Must be called with + * target process locked. If 'preferthread' is set, overwrite certain + * process-related fields that are maintained for both threads and + * processes. */ static void fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread) @@ -899,7 +900,8 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread) /* We can't get this anymore but ps etc never used it anyway. */ kp->ki_rqindex = 0; - SIGSETOR(kp->ki_siglist, td->td_siglist); + if (preferthread) + kp->ki_siglist = td->td_siglist; kp->ki_sigmask = td->td_sigmask; thread_unlock(td); } |