summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-04-12 00:38:47 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-04-12 00:38:47 +0000
commitcb24fd3c572701a01f5e94ba10d53c332c14c550 (patch)
tree6d3fd470a25556744eb8e279ab3018b59f4fbdd0 /sys/kern/kern_sig.c
parent1fbfa2b11c1afde8d0c3eafc577b779a6c12ca72 (diff)
downloadFreeBSD-src-cb24fd3c572701a01f5e94ba10d53c332c14c550.zip
FreeBSD-src-cb24fd3c572701a01f5e94ba10d53c332c14c550.tar.gz
Check SIG_HOLD action ealier to avoid missing test it in later code.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 65a07d0..c088409 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1639,7 +1639,13 @@ tdsignal(struct thread *td, int sig)
}
SIGADDSET(*siglist, sig);
signotify(td); /* uses schedlock */
-
+ /*
+ * Defer further processing for signals which are held,
+ * except that stopped processes must be continued by SIGCONT.
+ */
+ if (action == SIG_HOLD &&
+ !((prop & SA_CONT) && (p->p_flag & P_STOPPED_SIG)))
+ return;
/*
* Some signals have a process-wide effect and a per-thread
* component. Most processing occurs when the process next
@@ -1817,14 +1823,6 @@ tdsigwakeup(struct thread *td, int sig, sig_t action)
td->td_priority = PUSER;
}
}
-
- /*
- * Defer further processing for signals which are held,
- * except that stopped processes must be continued by SIGCONT.
- */
- if (action == SIG_HOLD) {
- return;
- }
if (TD_IS_SLEEPING(td)) {
/*
* If thread is sleeping uninterruptibly
OpenPOWER on IntegriCloud