34c34
< * $Id: tty_pty.c,v 1.15 1995/07/22 16:45:08 bde Exp $
---
> * $Id: tty_pty.c,v 1.16 1995/07/31 21:01:25 bde Exp $
315,317c315,319
< tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED);
< tp->t_state |= TS_ZOMBIE;
< ttyflush(tp, FREAD | FWRITE);
---
> if (tp->t_state & TS_ISOPEN) {
> tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED);
> tp->t_state |= TS_ZOMBIE;
> ttyflush(tp, FREAD | FWRITE);
> }
< * $Id: tty_pty.c,v 1.15 1995/07/22 16:45:08 bde Exp $
---
> * $Id: tty_pty.c,v 1.16 1995/07/31 21:01:25 bde Exp $
315,317c315,319
< tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED);
< tp->t_state |= TS_ZOMBIE;
< ttyflush(tp, FREAD | FWRITE);
---
> if (tp->t_state & TS_ISOPEN) {
> tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED);
> tp->t_state |= TS_ZOMBIE;
> ttyflush(tp, FREAD | FWRITE);
> }