summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-05-01 09:05:03 +0000
committerache <ache@FreeBSD.org>2000-05-01 09:05:03 +0000
commite9a33c5d473ed1aaf8bc89e8f09cb655e5b05196 (patch)
tree641d755d05af7b982a077111a4d584ad20bd5a06 /sys/kern/tty.c
parent385be7ece3ac207e3d01c5e4a3ee1e450f023a80 (diff)
downloadFreeBSD-src-e9a33c5d473ed1aaf8bc89e8f09cb655e5b05196.zip
FreeBSD-src-e9a33c5d473ed1aaf8bc89e8f09cb655e5b05196.tar.gz
Set t_timeout to its default sysctl value only once in ttyopen
Initialize t_timeout to -1 for this reason Pointed-by: bde
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 2ce8c8a..2670c9e 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);
}
OpenPOWER on IntegriCloud