SCCS-vsn: sys/kern/kern_sig.c 7.24
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_sig.c 7.23 (Berkeley) %G%
+ * @(#)kern_sig.c 7.24 (Berkeley) %G%
case SIGTSTP:
case SIGTTIN:
case SIGTTOU:
case SIGTSTP:
case SIGTTIN:
case SIGTTOU:
+ /*
+ * If sending a tty stop signal to a member of an orphaned
+ * process group, discard the signal here if the action
+ * is default; don't stop the process below if sleeping,
+ * and don't clear any pending SIGCONT.
+ */
+ if (p->p_pgrp->pg_jobc == 0 && action == SIG_DFL)
+ return;
+ /* FALLTHROUGH */
+
case SIGSTOP:
p->p_sig &= ~sigmask(SIGCONT);
break;
case SIGSTOP:
p->p_sig &= ~sigmask(SIGCONT);
break;