[comp.sys.hp] echo problems on 9k825

barry@giaea.gi.oz (Computer Centre Manager) (09/19/90)

We have an HP 9000/825 using HPUX 7.0. We want to turn off the computer
echo via "stty -echo" to save X.25 transmission costs. In both sh and csh
we can't, but it works fine in ksh.
We have processes that explicitly turn off echo, that work fine, but as
soon as you are back in sh or csh, echo is put back on.
Any advice on how to cure this situation is appreciated.
Anyone else have this problem ? Maybe it is our gettydef setup ???

Thanks,
Barry McInnes : barry@giaea.oz.au

georg@hpfcdc.HP.COM (Geri Georg) (09/21/90)

You can't turn off echoing in the HP-UX csh.  The reason is two-fold.

When csh is getting input, it turns off echoing and canonical processing.
It then inputs characters one at a time, and does things like file
expansion where necessary, depending on the character input.  If the
character is a regular character, it is then echoed "manually" by being
output again to the standard output device by csh.  Once the command is
input, csh turns on echoing and canonical processing.  So csh not only
echos data back out (regardless of the tty setting), but it also turns on
echoing in the tty setting.

The reason the tty setting is reset to turn on echoing and canonical
processing appears to be in order to recover in the case where a program
terminates abnormally (or I guess normally but without restoring the tty)
and leaves the tty in a basically unusable state.  Resetting echoing and
canonical processing avoids this problem.  But as a result of the tty
being reset by csh, there is no way to figure out if the user really 
wanted to turn off echoing, so there is no check that can be made in
order to turn off the "manual" echoing which is done by csh.

Geri Georg
Hewlett-Packard

gates@hpfcdc.HP.COM (Bill Gates) (09/22/90)

Well, you've heard from the csh guru, and since I'm supposedly the sh guru,
I'll respond next.  :-)

I can't duplicate this on 7.0 on either a 300 or an 800 SPU.  Exactly how
is echoing being reset for you using sh?  I logged in, executed a sh, typed
stty -echo, and presto - no echoing.  An stty echo promptly restores things.

Could you post a scenario which shows the failure?

Bill