From e40c842b1a4e5ea3f40c8e73232146022c74cb5f Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 1 May 2000 10:24:21 +0000 Subject: Since ptys are allocated dynamically, there is no needs to keep their t_timeout across close, so move t_timeout initializing to ptcopen --- sys/kern/tty_pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/tty_pty.c') diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 4e58c24..0f07561 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -157,7 +157,6 @@ ptyinit(n) devs->si_drv1 = devc->si_drv1 = pt; devs->si_tty = devc->si_tty = &pt->pt_tty; - pt->pt_tty.t_timeout = -1; ttyregister(&pt->pt_tty); } @@ -356,6 +355,7 @@ ptcopen(dev, flag, devtype, p) tp = dev->si_tty; if (tp->t_oproc) return (EIO); + tp->t_timeout = -1; tp->t_oproc = ptsstart; tp->t_stop = ptsstop; (void)(*linesw[tp->t_line].l_modem)(tp, 1); -- cgit v1.1