summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-05-13 20:36:02 +0000
committerjhb <jhb@FreeBSD.org>2003-05-13 20:36:02 +0000
commit89a4eb17deddba4ba8bfb0cf7c6801a608731f8c (patch)
tree0e2ba79e40f08e96bb98756b67576ff96caccfbc /sys/kern/kern_proc.c
parent3b9288c6f4df2bfdc2a41de3ae161246c310e064 (diff)
downloadFreeBSD-src-89a4eb17deddba4ba8bfb0cf7c6801a608731f8c.zip
FreeBSD-src-89a4eb17deddba4ba8bfb0cf7c6801a608731f8c.tar.gz
- Merge struct procsig with struct sigacts.
- Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson)
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 6810537..7665674 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -623,6 +623,7 @@ fill_kinfo_proc(p, kp)
struct tty *tp;
struct session *sp;
struct timeval tv;
+ struct sigacts *ps;
td = FIRST_THREAD_IN_PROC(p);
@@ -653,9 +654,12 @@ fill_kinfo_proc(p, kp)
kp->ki_rgid = p->p_ucred->cr_rgid;
kp->ki_svgid = p->p_ucred->cr_svgid;
}
- if (p->p_procsig) {
- kp->ki_sigignore = p->p_procsig->ps_sigignore;
- kp->ki_sigcatch = p->p_procsig->ps_sigcatch;
+ if (p->p_sigacts) {
+ ps = p->p_sigacts;
+ mtx_lock(&ps->ps_mtx);
+ kp->ki_sigignore = ps->ps_sigignore;
+ kp->ki_sigcatch = ps->ps_sigcatch;
+ mtx_unlock(&ps->ps_mtx);
}
mtx_lock_spin(&sched_lock);
if (p->p_state != PRS_NEW &&
OpenPOWER on IntegriCloud