aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_proc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 353a4e667c62..511369811896 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -829,9 +829,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)
@@ -900,7 +901,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);
}