summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r--sys/kern/subr_trap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 7ffb968..c0c0fd5 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -247,10 +247,17 @@ ast(struct trapframe *framep)
mtx_unlock_spin(&sched_lock);
}
if (sflag & PS_NEEDSIGCHK) {
+ int sigs;
+
+ sigs = 0;
PROC_LOCK(p);
- while ((sig = cursig(td)) != 0)
+ while ((sig = cursig(td)) != 0) {
postsig(sig);
+ sigs++;
+ }
PROC_UNLOCK(p);
+ if (p->p_flag & P_KSES && sigs)
+ thread_signal_upcall(td);
}
userret(td, framep, sticks);
OpenPOWER on IntegriCloud