Subject: Re: Does stty(1) not work in NetBSD 0.9?
To: None <Mike.Long@analog.com, netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Theo Deraadt <deraadt@fsa.ca>
List: netbsd-bugs
Date: 11/28/1993 15:58:10
>stty -a -f /dev/tty00
>stty -f /dev/tty00 clocal
>
>but the result of 'stty -a -f /dev/tty0' is unchanged; I still get
>-clocal.  The ownership of /dev/tty00 is uucp.wheel.  Recompiling stty
>from the sources distributed with 0.9 didn't fix the problem.

This is correct behaviour -- what you are trying to do is wrong.

tty devices reset to their initial state after a last-close. A last
close even is happening when the "stty clocal" exists. Thus the
clocal flag is getting reset.

(sio does this differently -- it fails to reset the device on a last
close. this is one of the reasons we won't install sio - it does it
wrong.)

If you really need to something like this, do it something like this:

	(stty clocal; command ) < /dev/tty00

Or something similar. This ensures that a last close does not happen
before "command" runs.

>Should I just upgrade to current and have done with it?

It is no different there, and never will be. The reset-on-last-close
behaviour *is* correct.

------------------------------------------------------------------------------