aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-08-02 02:55:47 +0000
committerBruce Evans <bde@FreeBSD.org>1995-08-02 02:55:47 +0000
commit76107ba3af9cfddd62dc3f9dfab45bcf93d10f9e (patch)
tree5784258e27a64fd8cf750287fd8cd8e7c1af46f4
parentbbfd33649d782cda27c7ff9e5f9c3aa4ffec3b4b (diff)
downloadsrc-76107ba3af9cfddd62dc3f9dfab45bcf93d10f9e.tar.gz
src-76107ba3af9cfddd62dc3f9dfab45bcf93d10f9e.zip
Notes
-rw-r--r--sys/kern/tty_pty.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 178082dd0f9b..9bbb0035daf9 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_pty.c 8.2 (Berkeley) 9/23/93
- * $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 $
*/
/*
@@ -312,9 +312,11 @@ ptcclose(dev)
* sense for ptys. Recover by doing everything that a normal
* ttymodem() would have done except for sending a SIGHUP.
*/
- 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);
+ }
tp->t_oproc = 0; /* mark closed */
tp->t_session = 0;