From owner-cvs-src@FreeBSD.ORG Sat Jun 14 07:16:20 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4A7D37B401; Sat, 14 Jun 2003 07:16:20 -0700 (PDT) Received: from comp.chem.msu.su (comp-ext.chem.msu.su [158.250.32.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27ECE43FAF; Sat, 14 Jun 2003 07:16:15 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.3p2/8.12.3) with ESMTP id h5EEG9SH049621; Sat, 14 Jun 2003 18:16:09 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.3p2/8.12.3/Submit) id h5EEG8Z4049620; Sat, 14 Jun 2003 18:16:08 +0400 (MSD) (envelope-from yar) Date: Sat, 14 Jun 2003 18:16:08 +0400 From: Yar Tikhiy To: Brian Feldman Message-ID: <20030614141608.GA48900@comp.chem.msu.su> References: <200306140826.h5E8QmHt031654@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306140826.h5E8QmHt031654@repoman.freebsd.org> User-Agent: Mutt/1.5.3i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/libexec/getty main.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2003 14:16:21 -0000 On Sat, Jun 14, 2003 at 01:26:48AM -0700, Brian Feldman wrote: > green 2003/06/14 01:26:48 PDT > > FreeBSD src repository > > Modified files: > libexec/getty main.c > Log: > In the last clean-up of this code, the fact that the default tty mode > information could only be gleaned from the the tty descriptor itself > was neglected, so never did the tty's default settings get copied from > the kernel. Specifically, this caused all manner of ctrl-keys to not > work. Fix this by calling dogettytab() in all the proper places, and > retrieving the terminfo temporarily in dogettytab(). Thank you for fixing my bug before I had time to take a look at it. However, your fix seems to have at least one drawback. Consider the following scenario: A gettytab(5) entry containing control character settings is used to initialize a terminal. Then another gettytab(5) entry is selected from autobaud() or portselector(), or through the "nx" capability. Since the current set of control characters is read from the terminal driver each time to get the default values, it will poison the actual defaults. I think I've nearly made a fix for this, which will reduce the number of tcgetattr(3) calls as well. -- Yar