To: Brian Buhrow <>
From: Lee Essen <>
List: current-users
Date: 02/22/1994 21:49:18

I've had the same problem, someone has stated that you can put 'np' (meaning
no parity, 8 bits) in the gettydef, but upon looking through the getty
code I don't believe that this will be the case...

In main.c there is a call to set_ttydefaults(0) just before login is called...

>                        set_ttydefaults(0);
>                        execle(LO, "login", "-p", name, (char *) 0, env);  
>                        syslog(LOG_ERR, "%s: %m", LO);

set_ttydefaults() (ttydefaults.c) uses the defines in <sys/ttydefaults.h> to
set the default line options...

>        term.c_iflag = TTYDEF_IFLAG;
>        term.c_oflag = TTYDEF_OFLAG;
>        term.c_lflag = TTYDEF_LFLAG;
>        term.c_cflag = TTYDEF_CFLAG;

The important one here is CFLAG, which is set in the include file to...

>	 #define TTYDEF_CFLAG     (CREAD | CS7 | PARENB | HUPCL)

So in my opinion (and I havent tested the 'np' option), you have to change
getty to get this to work. I've modified ttydefaults.c to read...

>	 term.c_cflag = CREAD | HUPCL;

And it all works really well with no problems, I realise that this is a
nasty hack but it works.

If someone would explain the thinking behind calling set_ttydefaults (which
will undo all the settings in your gettytab) then I'de be very interested
to hear.

Of course there is always the possibility that I've got completely the
wrong end of the stick! (Especially considering the higher than normal
alcohol content in my blood at the moment! - it's 9:50 pm here!!)

Essential Solutions Ltd	
40 Tatnam Road			Voice:		+44 202 736230
Poole				Data/Fax:	+44 202 716063
BH15 2DR			E-Mail: