Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jun 2003 11:02:09 -0400
From:      "Brian F. Feldman" <green@FreeBSD.org>
To:        Yar Tikhiy <yar@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/libexec/getty main.c 
Message-ID:  <200306141502.h5EF297V002087@green.bikeshed.org>
In-Reply-To: Message from Yar Tikhiy <yar@FreeBSD.org>  <20030614141608.GA48900@comp.chem.msu.su> 

next in thread | previous in thread | raw e-mail | index | archive | help
Yar Tikhiy <yar@FreeBSD.org> wrote:
> 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.

That's ok, I knew it didn't do EXACTLY the same thing, but it shouldn't 
actually do any behavior detrimental to the user.  I know the more involved 
fix means you should probably take a copy of the tmode initially and store 
that as the one to initialize default values from, but I wasn't sure how 
you'd want to organize that.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306141502.h5EF297V002087>