diff options
| author | 2012-06-06 04:47:42 +0000 | |
|---|---|---|
| committer | 2012-06-06 04:47:42 +0000 | |
| commit | 0006fbf08a39731d1981db2e68f5ce1dbe8d1203 (patch) | |
| tree | 5aa1cb2b1fd5d0e95b57ecadfaf87170b5acc50d /sys/kern/kern_sig.c | |
| parent | Add support for hiding a user's processes in top. (diff) | |
| download | wireguard-openbsd-0006fbf08a39731d1981db2e68f5ce1dbe8d1203.tar.xz wireguard-openbsd-0006fbf08a39731d1981db2e68f5ce1dbe8d1203.zip | |
EVFILT_SIGNAL and EVFILT_PROC events need to track the process they're
attached to and not just the thread, which can go away.
Problem observed by jsg@; ok jsg@ matthew@
Diffstat (limited to 'sys/kern/kern_sig.c')
| -rw-r--r-- | sys/kern/kern_sig.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index c1cb5857ce0..06c26542e46 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.141 2012/04/13 16:37:51 kettenis Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.142 2012/06/06 04:47:43 guenther Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -1647,13 +1647,13 @@ initsiginfo(siginfo_t *si, int sig, u_long trapno, int code, union sigval val) int filt_sigattach(struct knote *kn) { - struct proc *p = curproc; + struct process *pr = curproc->p_p; - kn->kn_ptr.p_proc = p; + kn->kn_ptr.p_process = pr; kn->kn_flags |= EV_CLEAR; /* automatically set */ /* XXX lock the proc here while adding to the list? */ - SLIST_INSERT_HEAD(&p->p_p->ps_klist, kn, kn_selnext); + SLIST_INSERT_HEAD(&pr->ps_klist, kn, kn_selnext); return (0); } @@ -1661,9 +1661,9 @@ filt_sigattach(struct knote *kn) void filt_sigdetach(struct knote *kn) { - struct proc *p = kn->kn_ptr.p_proc; + struct process *pr = kn->kn_ptr.p_process; - SLIST_REMOVE(&p->p_p->ps_klist, kn, knote, kn_selnext); + SLIST_REMOVE(&pr->ps_klist, kn, knote, kn_selnext); } /* |
