From owner-cvs-all Sun Apr 30 11:12:14 2000 Delivered-To: cvs-all@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 807EA37BD2D for ; Sun, 30 Apr 2000 11:12:05 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 4055 invoked from network); 30 Apr 2000 18:12:00 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 30 Apr 2000 18:12:00 -0000 Date: Mon, 1 May 2000 04:11:56 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: "Andrey A. Chernov" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern tty.c In-Reply-To: <200004301600.JAA18945@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 30 Apr 2000, Andrey A. Chernov wrote: > ache 2000/04/30 09:00:54 PDT > > Modified files: > sys/kern tty.c > Log: > Add sysctl variable to set initial drainwait timeout on ttyopen, default to > 5 minutes 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. 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. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message