diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-07-21 00:26:52 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-07-21 00:26:52 +0000 |
commit | ae381380342de84921f2808535a244914dd1ce9a (patch) | |
tree | 89100aa8dad21e7406a13091795ea5200dbde1cb /sys/kern/kern_sig.c | |
parent | 284105499b2dd52be8261f5fb46c4491349d5398 (diff) | |
download | FreeBSD-src-ae381380342de84921f2808535a244914dd1ce9a.zip FreeBSD-src-ae381380342de84921f2808535a244914dd1ce9a.tar.gz |
Always deliver synchronous signal to UTS for SA threads.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d6e2fc7..f2df08a 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1515,6 +1515,9 @@ trapsignal(struct thread *td, int sig, u_long code) if (td->td_upcall) td->td_upcall->ku_flags |= KUF_DOUPCALL; mtx_unlock_spin(&sched_lock); + } else { + /* UTS caused a sync signal */ + sigexit(td, SIGILL); } } else { PROC_LOCK(p); @@ -1540,6 +1543,7 @@ trapsignal(struct thread *td, int sig, u_long code) error = copyout(&siginfo, &td->td_mailbox->tm_syncsig, sizeof(siginfo)); PROC_LOCK(p); + /* UTS memory corrupted */ if (error) sigexit(td, SIGILL); SIGADDSET(td->td_sigmask, sig); @@ -2282,7 +2286,8 @@ postsig(sig) #endif _STOPEVENT(p, S_SIG, sig); - if (action == SIG_DFL) { + if (!(td->td_flags & TDF_SA && td->td_mailbox) && + action == SIG_DFL) { /* * Default action, where the default is to kill * the process. (Other cases were ignored above.) @@ -2291,6 +2296,13 @@ postsig(sig) sigexit(td, sig); /* NOTREACHED */ } else { + if (td->td_flags & TDF_SA && td->td_mailbox) { + if (sig == SIGKILL) { + mtx_unlock(&ps->ps_mtx); + sigexit(td, sig); + } + } + /* * If we get here, the signal must be caught. */ @@ -2333,7 +2345,7 @@ postsig(sig) p->p_code = 0; p->p_sig = 0; } - if (td->td_flags & TDF_SA) + if (td->td_flags & TDF_SA && td->td_mailbox) thread_signal_add(curthread, sig); else (*p->p_sysent->sv_sendsig)(action, sig, |