summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-04-09 22:28:24 +0000
committerache <ache@FreeBSD.org>1995-04-09 22:28:24 +0000
commit526fc7d3351ddf8259727fe8d0272c9e161ecc49 (patch)
treee7052be6fd9f7a6b1f58ea7799e653add51e4b05 /sys/kern/tty_pty.c
parent007c073f7afcd762e5d5360d0a2b128698a63be1 (diff)
downloadFreeBSD-src-526fc7d3351ddf8259727fe8d0272c9e161ecc49.zip
FreeBSD-src-526fc7d3351ddf8259727fe8d0272c9e161ecc49.tar.gz
ptcwakeup() was called from wrong places
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 861982e..4287920 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.7 1995/02/25 20:09:30 pst Exp $
+ * $Id: tty_pty.c,v 1.8 1995/02/28 00:21:05 pst Exp $
*/
/*
@@ -144,7 +144,8 @@ ptsopen(dev, flag, devtype, p)
return (error);
}
error = (*linesw[tp->t_line].l_open)(dev, tp);
- ptcwakeup(tp, FREAD|FWRITE);
+ if (error == 0)
+ ptcwakeup(tp, FREAD|FWRITE);
return (error);
}
@@ -158,9 +159,9 @@ ptsclose(dev, flag, mode, p)
int err;
tp = &pt_tty[minor(dev)];
- err = (*linesw[tp->t_line].l_close)(tp, flag);
- err |= ttyclose(tp);
ptcwakeup(tp, FREAD|FWRITE);
+ err = (*linesw[tp->t_line].l_close)(tp, flag);
+ (void) ttyclose(tp);
return (err);
}
OpenPOWER on IntegriCloud