aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-05-01 09:05:03 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-05-01 09:05:03 +0000
commit4eaed34ba019e0c39f1c3eeed646542d30ad4f05 (patch)
tree1402432030228430aef6f1a4fcbd80882a7f3fdb
parentaf5bd99e9ae010bae45cd99c46e117bba4c1d4f6 (diff)
Notes
-rw-r--r--sys/kern/tty.c4
-rw-r--r--sys/kern/tty_pty.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 2ce8c8ac93ce..2670c9e4d0da 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -223,7 +223,8 @@ ttyopen(device, tp)
bzero(&tp->t_winsize, sizeof(tp->t_winsize));
}
/* XXX don't hang forever on output */
- tp->t_timeout = drainwait*hz;
+ if (tp->t_timeout < 0)
+ tp->t_timeout = drainwait*hz;
ttsetwater(tp);
splx(s);
return (0);
@@ -2402,6 +2403,7 @@ ttymalloc(tp)
return(tp);
tp = malloc(sizeof *tp, M_TTYS, M_WAITOK);
bzero(tp, sizeof *tp);
+ tp->t_timeout = -1;
ttyregister(tp);
return (tp);
}
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 14269c131616..4e58c2410b31 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -157,6 +157,7 @@ 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);
}