diff options
author | ache <ache@FreeBSD.org> | 2000-05-01 10:24:21 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2000-05-01 10:24:21 +0000 |
commit | e40c842b1a4e5ea3f40c8e73232146022c74cb5f (patch) | |
tree | 14bbecf572ca1ffccee8cfa5a038de69f9416663 /sys/kern | |
parent | 3eb0f89ee2eb7620993cf77b0956f32c9bd74da2 (diff) | |
download | FreeBSD-src-e40c842b1a4e5ea3f40c8e73232146022c74cb5f.zip FreeBSD-src-e40c842b1a4e5ea3f40c8e73232146022c74cb5f.tar.gz |
Since ptys are allocated dynamically, there is no needs to keep their
t_timeout across close, so move t_timeout initializing to ptcopen
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_pty.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |