34c34
< * $FreeBSD: head/sys/kern/tty_pty.c 90831 2002-02-18 06:07:11Z dillon $
---
> * $FreeBSD: head/sys/kern/tty_pty.c 91140 2002-02-23 11:12:57Z tanimura $
43a44,46
> #include <sys/lock.h>
> #include <sys/mutex.h>
> #include <sys/sx.h>
239a243,244
> PGRPSESS_SLOCK();
> PROC_LOCK(p);
242c247,248
< p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT)
---
> p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT) {
> PROC_UNLOCK(p);
243a250,253
> }
> PROC_UNLOCK(p);
> PGRP_LOCK(p->p_pgrp);
> PGRPSESS_SUNLOCK();
244a255
> PGRP_UNLOCK(p->p_pgrp);
718c729,733
< pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
---
> if (tp->t_pgrp != NULL) {
> PGRP_LOCK(tp->t_pgrp);
> pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
> PGRP_UNLOCK(tp->t_pgrp);
> }
< * $FreeBSD: head/sys/kern/tty_pty.c 90831 2002-02-18 06:07:11Z dillon $
---
> * $FreeBSD: head/sys/kern/tty_pty.c 91140 2002-02-23 11:12:57Z tanimura $
43a44,46
> #include <sys/lock.h>
> #include <sys/mutex.h>
> #include <sys/sx.h>
239a243,244
> PGRPSESS_SLOCK();
> PROC_LOCK(p);
242c247,248
< p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT)
---
> p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT) {
> PROC_UNLOCK(p);
243a250,253
> }
> PROC_UNLOCK(p);
> PGRP_LOCK(p->p_pgrp);
> PGRPSESS_SUNLOCK();
244a255
> PGRP_UNLOCK(p->p_pgrp);
718c729,733
< pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
---
> if (tp->t_pgrp != NULL) {
> PGRP_LOCK(tp->t_pgrp);
> pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
> PGRP_UNLOCK(tp->t_pgrp);
> }