[comp.bugs.sys5] getty ignores flags in /etc/gettydef

rogerc@ncrcae.Columbia.NCR.COM (Roger Collins) (01/19/89)

Why can't a gettydef author have full control of the initial
tty settings on a terminal by munging the gettydef entry? More specifically,
try setting IGNPAR in the initial settings field of a gettydef entry.
Then (after spawning getty) do "stty -a </dev/ttyNN."  You will see
"-ignpar" in the output.  The IGNPAR was ignored.

Here's why.  The following line of source in getty is executed after
the initial settings field have already been read and stored in
gptr->g_iflags (struct termio).

	gptr->g_iflags.c_iflag &= (ICRNL | ISTRIP | IXON | IXANY);

In V.3.2, the line is

	gptr->g_iflags.c_iflag  &= ICRNL;

This says ignore ALL initial settings except for ICRNL ISTRIP IXON and IXANY.
Or, in V.3.2, ignore all except ICRNL.  Why?

Am I missing something here?

Why doesn't it do the pure and simple:  Turn on the flags that
are in the field -- don't turn on the ones that aren't.  I'm
pretty sure that's what is documented.

--
Roger Collins
NCR - E&M Columbia
rogerc@ncrcae.Columbia.NCR.COM