diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-10-01 00:16:17 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-10-01 00:16:17 +0000 |
commit | 8ff315066069409e70ce58c41fd244540234a152 (patch) | |
tree | d0a12ca4174a2e03cf568f3c5426ea77f763ee4f /sys | |
parent | a8d86705cfc76b2c997e69114c1c0f8c049ec4da (diff) | |
download | FreeBSD-src-8ff315066069409e70ce58c41fd244540234a152.zip FreeBSD-src-8ff315066069409e70ce58c41fd244540234a152.tar.gz |
Back out code changes that snuck into the previous forced commit.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sig.c | 13 | ||||
-rw-r--r-- | sys/kern/subr_sigq.c | 17 | ||||
-rw-r--r-- | sys/sys/ksiginfo.h | 2 |
3 files changed, 4 insertions, 28 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 5e42a7e..ada2016 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1227,11 +1227,8 @@ trapsignal(p, sig, code) u_long code; { register struct sigacts *ps = p->p_sigacts; - struct ksiginfo *ksi; PROC_LOCK(p); - ksiginfo_alloc(&ksi, sig); - ksi->ksi_code = code; if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) && !SIGISMEMBER(p->p_sigmask, sig)) { p->p_stats->p_ru.ru_nsignals++; @@ -1240,8 +1237,8 @@ trapsignal(p, sig, code) ktrpsig(sig, ps->ps_sigact[_SIG_IDX(sig)], &p->p_sigmask, code); #endif - (*p->p_sysent->sv_sendsig)(ps->ps_sigact[_SIG_IDX(sig)], ksi, - &p->p_sigmask); + (*p->p_sysent->sv_sendsig)(ps->ps_sigact[_SIG_IDX(sig)], sig, + &p->p_sigmask, code); SIGSETOR(p->p_sigmask, ps->ps_catchmask[_SIG_IDX(sig)]); if (!SIGISMEMBER(ps->ps_signodefer, sig)) SIGADDSET(p->p_sigmask, sig); @@ -1802,7 +1799,6 @@ postsig(sig) { struct thread *td = curthread; register struct proc *p = td->td_proc; - struct ksiginfo *ksi; struct sigacts *ps; sig_t action; sigset_t returnmask; @@ -1812,7 +1808,7 @@ postsig(sig) PROC_LOCK_ASSERT(p, MA_OWNED); ps = p->p_sigacts; - ksiginfo_dequeue(&ksi, p, sig); + signal_delete(p, NULL, sig); action = ps->ps_sigact[_SIG_IDX(sig)]; #ifdef KTRACE if (KTRPOINT(td, KTR_PSIG)) @@ -1826,7 +1822,6 @@ postsig(sig) * Default action, where the default is to kill * the process. (Other cases were ignored above.) */ - ksiginfo_destroy(&ksi); sigexit(td, sig); /* NOTREACHED */ } else { @@ -1875,7 +1870,7 @@ postsig(sig) if (p->p_flag & P_KSES) if (signal_upcall(p, sig)) return; - (*p->p_sysent->sv_sendsig)(action, ksi, &returnmask); + (*p->p_sysent->sv_sendsig)(action, sig, &returnmask, code); } } diff --git a/sys/kern/subr_sigq.c b/sys/kern/subr_sigq.c index cf5dd50..fa44fab 100644 --- a/sys/kern/subr_sigq.c +++ b/sys/kern/subr_sigq.c @@ -118,23 +118,6 @@ out: } int -ksiginfo_to_siginfo_t(struct ksiginfo *ksi, siginfo_t *si) -{ - int error; - - error = 0; - - si->si_addr = ksi->ksi_addr; - si->si_code = ksi->ksi_code; - si->si_errno = ksi->ksi_errno; - si->si_signo = ksi->ksi_errno; - si->si_status = ksi->ksi_status; - si->si_uid = ksi->ksi_ruid; - si->si_pid = ksi->ksi_pid; - return (error); -} - -int ksiginfo_to_sigset_t(struct proc *p, sigset_t *setp) { int error; diff --git a/sys/sys/ksiginfo.h b/sys/sys/ksiginfo.h index 40d9542..26b88d5 100644 --- a/sys/sys/ksiginfo.h +++ b/sys/sys/ksiginfo.h @@ -36,7 +36,6 @@ #endif #include <sys/malloc.h> -#include <sys/signal.h> /* * Structures and prototypes for working with the in-kernel representation @@ -67,7 +66,6 @@ __BEGIN_DECLS; int ksiginfo_alloc(struct ksiginfo **, int); int ksiginfo_dequeue(struct ksiginfo **, struct proc *, int); int ksiginfo_destroy(struct ksiginfo **); -int ksiginfo_to_siginfo_t(struct ksiginfo *, siginfo_t *); int ksiginfo_to_sigset_t(struct proc *, sigset_t *); int signal_add(struct proc *, struct ksiginfo *, int); int signal_delete(struct proc *, struct ksiginfo *, int); |