From 5312b1c7fa75aa0c8402f308ac3c1bf3e97967b1 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sat, 12 Apr 2003 00:38:47 +0000 Subject: [PATCH] Check SIG_HOLD action ealier to avoid missing test it in later code. --- sys/kern/kern_sig.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 65a07d08e753..c088409d21b2 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