*BSD News Article 18810


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!swrinde!menudo.uh.edu!uuneo!sugar!peter
From: peter@NeoSoft.com (Peter da Silva)
Subject: Re: sio - problem with login hanging up
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Fri, 23 Jul 1993 22:24:15 GMT
Message-ID: <CAn28H.6AI@sugar.NeoSoft.COM>
References: <22epf0INNt7q@kralizec.zeta.org.au> <CAILGB.1B7@sugar.NeoSoft.COM> <22mg9nINNlud@kralizec.zeta.org.au>
Lines: 49

In article <22mg9nINNlud@kralizec.zeta.org.au> bde@kralizec.zeta.org.au (Bruce Evans) writes:
> I don't think not having a default configuration is broken.

I do. Having a way to *change* the default is correct, but any device should
reset itself on last close (and that includes /dev/console, by the way...
logging out should knock you back to something sane no matter what you
did to your console!). Getty shouldn't have to know the behaviour of every
device that's out there.

> Programs need
> to initialise _all_ they tty state that they care about.

Yep. That's true. And in your example, zmodem cares about a lot of stuff.
In any case, you can always build a wrapper that doesn't depend on zombie
modes hanging around. For your example:

	( stty `cat settings` ; zmodem ) < /dev/ttyXX > /dev/ttyXX

Make it "exec zmodem" if you like.

> getty ought
> to clear clocal on ports connected to modems, and leave it unchanged for
> ports connected to terminals.

And it ought to turn off graphics mode on the console, and send modem
initialization strings, and do all sorts of stuff that's dependent on
each and every particular set of devices and hardware you're running
it on?

I think that, rather, each port should come up in a sane state that's
known to be safe on first open. If you want to change that, do it in
a setup stage after it's open, or create a new ioctl that means "change
the default settings". This ioctl should be root only, so you do:

	stty `cat settings` save < /dev/ttyXX

in your inittab.

> There ought to be stuff in /etc/gettytab
> to control this.  I don't think there is.  Anyway, it would get blown
> away when getty sets fixed defaults before exec'ing login.

It shouldn't do that, either. The way all 386BSD programs blow away any
local settings all the time is a bug.
-- 
Peter da Silva.  <peter@sugar.neosoft.com>.
 `-_-'   Hefur pu fadmad ulfinn i dag?
  'U`    
"Det er min ledsager, det er ikke drikkepenge."