void sgrpsig(uint16_t pgrp, uint16_t sig)
{
ptptr p;
- for (p = ptab; p < ptab_end; ++p) {
- if (p->p_pgrp == pgrp)
- ssig(p, sig);
+ if (pgrp) {
+ for (p = ptab; p < ptab_end; ++p)
+ if (p->p_pgrp == pgrp)
+ ssig(p, sig);
}
}
if (p->p_pgrp == udata.u_ptab->p_pid) {
p->p_pgrp = 0;
ssig(p, SIGHUP);
+ ssig(p, SIGCONT);
}
}
tty_exit();
struct tty *t = &ttydata[minor];
/* Kill users */
sgrpsig(t->pgrp, SIGHUP);
+ sgrpsig(t->pgrp, SIGCONT);
t->pgrp = 0;
/* Stop any new I/O with errors */
t->flag |= TTYF_DEAD;