[hacknews] getty

henry (07/28/82)

Fixed getty(8) to ignore the terminate signal the new shutdown(1) sends
to warn processes of shutdown.  Getty doesn't need to be warned, and this
should stop the extra login messages printed during shutdown.  Also added
several improvements which have been waiting for an opportunity to go in:

- Multiple speeds on a line.  The speed argument to getty can now be a
	comma-separated list of speeds (no spaces after the commas!).
- Hooks for hardware speed sensing (although our drivers don't support
	this just yet).
- Better error reporting.  Most errors now cause getty to display "!getty
	error!" to ps instead of making the system thrash.
- Various bits of internal cleanup.

henry@utzoo.UUCP (Henry Spencer) (09/13/84)

Getty(8) has been modified to prevent the well-known phenomenon in
which the wtmp file bloats ridiculously in the presence of a noisy
line.  As near as we can figure it out, this problem is caused like
this:

	1. Getty is basically throwing away characters with framing
		errors, which is why getty piles up cpu time in the
		presence of line noise.
	2. When getty gets 16 characters or so without framing errors,
		it thinks it's got a login name.  (The next-char loop
		terminates on array overflow as well as on an explicit
		newline.)  So it gets things set up to invoke login.
	3. Among other setup chores, it sets the tty into cooked mode.
		Framing errors are now taken as interrupts.
	4. A framing error destroys the getty, causing init to write
		a logoff record and fork a new getty.

Two changes have been made to getty.  First, array overflow no longer
terminates the get-login-name loop; it just recycles the array pointer
back to the beginning of the array.  Second, getty sets SIGINT to
"ignored" before flipping the tty into cooked mode.  (This doesn't hurt
login(1), since login does the same thing with SIGINT immediately on
invocation.)
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

henry@utzoo.UUCP (Henry Spencer) (05/01/85)

Getty(8) has been adjusted to assume terminals are always dual-case unless
it is given a -u option.  -u has been set for the phone lines and one line
(Pomeranz) which is believed to have a very old terminal.  Getty has also
been fixed up to use getopt(3).
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

henry@utzoo.UUCP (Henry Spencer) (01/18/86)

Getty(8) has been changed in a couple of ways.  First, it now attempts to
detect noisy lines and turn them off temporarily.  And second, it now looks
at /etc/nologin and, if it is non-empty, prints it out and refuses to exec
login.  The backup-warning system has been set up so that it turns off
logins when it issues the please-sign-off-now message at 1759, and /etc/rc
turns logins back on.  Selected terminals are exempt from this to allow
dealing with emergencies.

The /etc/nologin check probably belongs in login rather than getty,
but I didn't think of that until I had it all set up.  I will fix that
eventually.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry