- /*
- * Set the new mask value and also defer further
- * occurences of this signal.
- *
- * Special case: user has done a sigpause. Here the
- * current mask is not of interest, but rather the
- * mask from before the sigpause is what we want
- * restored after the signal processing is completed.
- */
- (void) splhigh();
- if (p->p_flag & SOMASK) {
- returnmask = u.u_oldmask;
- p->p_flag &= ~SOMASK;
- } else
- returnmask = p->p_sigmask;
- p->p_sigmask |= u.u_sigmask[sig] | mask;
- (void) spl0();
- u.u_ru.ru_nsignals++;
+ /*
+ * Set the new mask value and also defer further
+ * occurences of this signal.
+ *
+ * Special case: user has done a sigpause. Here the
+ * current mask is not of interest, but rather the
+ * mask from before the sigpause is what we want
+ * restored after the signal processing is completed.
+ */
+ (void) splhigh();
+ if (ps->ps_flags & SA_OLDMASK) {
+ returnmask = ps->ps_oldmask;
+ ps->ps_flags &= ~SA_OLDMASK;
+ } else
+ returnmask = p->p_sigmask;
+ p->p_sigmask |= ps->ps_catchmask[sig] | mask;
+ (void) spl0();
+ p->p_stats->p_ru.ru_nsignals++;