Subject: Re: defaults for tty open
To: Charles M. Hannum <mycroft@NetBSD.ORG>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 02/01/1996 09:55:51
> The default tty modes should be set on all `first opens'.  It would be
> incorrect for an application to rely on the previous settings anyway, and
> this at least makes things consistent.

Ok. But then how should I solve my problem? Basically my problem is that
I don't have a tty hooked up to the serial port, but the defaults
implicitly assume I do. Having echo on is a VERY EVIL thing for my
printer. How, other than not resetting tty defaults on `first opens',
can I make the printer work?

I agree that for a number of situations, such as hooking a tty up to
the serial port, or working in a multi-user environment, that setting
defaults on `first open' can be a good thing.

But my computer will probably only have me as its user. If I want to
do something unique to my setup, why can't I? I'm lucky in that I'm
writing the serial port driver, so each serial port is gaining the
ability to have its own concept of tty defaults. But what about
other folks?

Also, I agree that it's dangerous for a program to assume a tty will be
just as it needs it, but what do we do for programs which can't set
tty settings right? lpd comes to mind. It does NOT support 57600
baud, and its method of setting control flags looks archaic.

I agree that not setting defaults on `first open' might be inelegant,
but it helps deal with other problems which we aren't dealing with 
right now.

Take care,

Bill