From owner-cvs-all Sun Apr 30 11:23:48 2000 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 542) id 939CF37BD15; Sun, 30 Apr 2000 11:23:44 -0700 (PDT) Date: Sun, 30 Apr 2000 11:23:44 -0700 From: "Andrey A. Chernov" To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern tty.c Message-ID: <20000430112344.A13987@freebsd.org> References: <200004301600.JAA18945@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from bde@zeta.org.au on Mon, May 01, 2000 at 04:11:56AM +1000 Organization: Biomechanoid Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, May 01, 2000 at 04:11:56AM +1000, Bruce Evans wrote: > This is all very broken. It used to be possible to set the drainwait timeout > using comcontrol and have the setting live across closes. /etc/rc.serial > has examples of setting it. Now, the setting gets clobbered in ttyopen() > not only for first opens, but for open of the termios line discipline, i.e., > for every open(2) and for every reentry to the termios line discipline > (TIOCSETD to TTYDISC). This bug was introduced in the previous commit. > The sysctl just allows changing the default value that is used to clobber > the setting. BTW, you say nothing when I send initial patch for review. Probably ttyopen not the best place for setting t_timeout to its default value. What place you suggest as better one? > Sysctls shouldn't be used in device drivers. Here the default should only > be used if the timeout has not already been set. Changing the default > using sysctl will have little or no effect effect after the system has > warmed up, since most or all ttys will have had their timeouts set. I disagree. 1) This sysctl supposed to be called early in rc.sysctl, before any tty device comes up. 2) You forget about ptys which are open/closed often, it is needed mainly for them (hanging TCP connections) 3) In current variant (with ttyopen), even ttyv* change timeout after loggin out. -- Andrey A. Chernov http://nagual.pp.ru/~ache/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message