From ab9576d148911cbb62bb83809ab44e7301ab63e9 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 30 Apr 2000 16:00:53 +0000 Subject: Add sysctl variable to set initial drainwait timeout on ttyopen, default to 5 minutes --- sys/kern/tty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 249880f..2ce8c8a 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -200,6 +200,10 @@ static u_char const char_type[] = { */ static SLIST_HEAD(, tty) tty_list; +static int drainwait = 5*60; +SYSCTL_INT(_kern, OID_AUTO, drainwait, CTLFLAG_RW, &drainwait, + 0, "Output drain timeout in seconds"); + /* * Initial open of tty, or (re)entry to standard tty line discipline. */ @@ -219,7 +223,7 @@ ttyopen(device, tp) bzero(&tp->t_winsize, sizeof(tp->t_winsize)); } /* XXX don't hang forever on output */ - tp->t_timeout = 5*60*hz; + tp->t_timeout = drainwait*hz; ttsetwater(tp); splx(s); return (0); -- cgit v1.1