Date: Mon, 9 Mar 1998 23:00:01 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs Subject: Re: bin/5959: Cannot set up clocal gettys Message-ID: <199803100700.XAA28083@hub.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR bin/5959; it has been noted by GNATS.
From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, nick@specialix.com
Cc: Subject: Re: bin/5959: Cannot set up clocal gettys
Date: Tue, 10 Mar 1998 17:52:11 +1100
>There seems to be no documented way to set up gettys with clocal in effect.
>Setting clocal in /dev/ttyid0 seems to be overridden when the getty actually
>starts, and there is no flag I can find in gettytab that will set clocal.
>Even setting the appropriate bits in c0, c1 and c2 doesn't seem to work.
The bug in getty seems to be that you have to specify a complete set of
flags (as sort of documented in the man page), AND all flags in the set
must be nonzero. The complete sets are {c0, i0, l0, o0}, {c1, i1, l1, o1},
and {c2, i2, l2, o2}. The '1' flags in local.9600 in gettytab don't work,
because some of them are zero. I think this can be worked around by
setting an unused flag bit.
You can lock clocal in /dev/ttyld0 after setting (or clearing) it in
dev/ttyid0. /etc/rc.conf has an example. This prevents buggy programs
from changing it. It also prevents non-buggy programs from changing it.
>>How-To-Repeat:
>
>Set up a std.9600 getty on ttyd0, but don't kill -1 1 yet.
>stty clocal < /dev/ttyid0
>kill -1 1
>stty -a </dev/ttyd0
>
>The last stty will hang, because ttyd0 is waiting on a carrier
>inappropriately.
This is working as intended. The setting of the initial-state device
only applies to first opens. Opens of an already-open tty have no
effect on the termios state. Set ttyd0 as well as ttyid0 if you want
the changes to take effect immediately, or set ttyid0 in /etc/rc.serial
or /etc/rc.local if you always want the same settings.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803100700.XAA28083>
