diff options
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 0d597e559c8d..d36c382d3e23 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include <sys/procdesc.h> #include <sys/ptrace.h> #include <sys/posix4.h> -#include <sys/pioctl.h> #include <sys/racct.h> #include <sys/resourcevar.h> #include <sys/sdt.h> @@ -2256,14 +2255,6 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) !((prop & SIGPROP_CONT) && (p->p_flag & P_STOPPED_SIG))) return (ret); - /* SIGKILL: Remove procfs STOPEVENTs. */ - if (sig == SIGKILL) { - /* from procfs_ioctl.c: PIOCBIC */ - p->p_stops = 0; - /* from procfs_ioctl.c: PIOCCONT */ - p->p_step = 0; - wakeup(&p->p_step); - } wakeup_swapper = 0; /* @@ -2853,15 +2844,13 @@ issignal(struct thread *td) struct sigqueue *queue; sigset_t sigpending; ksiginfo_t ksi; - int prop, sig, traced; + int prop, sig; p = td->td_proc; ps = p->p_sigacts; mtx_assert(&ps->ps_mtx, MA_OWNED); PROC_LOCK_ASSERT(p, MA_OWNED); for (;;) { - traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG); - sigpending = td->td_sigqueue.sq_signals; SIGSETOR(sigpending, p->p_sigqueue.sq_signals); SIGSETNAND(sigpending, td->td_sigmask); @@ -2904,17 +2893,12 @@ issignal(struct thread *td) sig = sig_ffs(&sigpending); } - if (p->p_stops & S_SIG) { - mtx_unlock(&ps->ps_mtx); - stopevent(p, S_SIG, sig); - mtx_lock(&ps->ps_mtx); - } - /* * We should see pending but ignored signals * only if P_TRACED was on when they were posted. */ - if (SIGISMEMBER(ps->ps_sigignore, sig) && (traced == 0)) { + if (SIGISMEMBER(ps->ps_sigignore, sig) && + (p->p_flag & P_TRACED) == 0) { sigqueue_delete(&td->td_sigqueue, sig); sigqueue_delete(&p->p_sigqueue, sig); continue; @@ -3114,11 +3098,6 @@ postsig(int sig) ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ? &td->td_oldsigmask : &td->td_sigmask, ksi.ksi_code); #endif - if ((p->p_stops & S_SIG) != 0) { - mtx_unlock(&ps->ps_mtx); - stopevent(p, S_SIG, sig); - mtx_lock(&ps->ps_mtx); - } if (action == SIG_DFL) { /* @@ -3665,7 +3644,6 @@ coredump(struct thread *td) PROC_LOCK_ASSERT(p, MA_OWNED); MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); - _STOPEVENT(p, S_CORE, 0); if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0) || (p->p_flag2 & P2_NOTRACE) != 0) { |