summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-04-27 20:14:21 +0000
committerache <ache@FreeBSD.org>2000-04-27 20:14:21 +0000
commitd12764ac5d0af48063da0cac70235368be455ec2 (patch)
tree35e46798925148ee41eb5a36baef0e0a85646e06
parent608e488b33371e609aca6a77af091461044cc7cd (diff)
downloadFreeBSD-src-d12764ac5d0af48063da0cac70235368be455ec2.zip
FreeBSD-src-d12764ac5d0af48063da0cac70235368be455ec2.tar.gz
Add default 5min timeout for output drain to stop hanging on exit or in other
places when connection dropped
-rw-r--r--sys/kern/tty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index f393caf..249880f 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -218,6 +218,8 @@ ttyopen(device, tp)
SET(tp->t_state, TS_CONNECTED);
bzero(&tp->t_winsize, sizeof(tp->t_winsize));
}
+ /* XXX don't hang forever on output */
+ tp->t_timeout = 5*60*hz;
ttsetwater(tp);
splx(s);
return (0);
OpenPOWER on IntegriCloud