Stty hupcl ixon ixoff

I see stty, not a typewritter messages in hpux (despite checking the interactive terminal?), And I assume this is due to strict lines in my .kshrc file:

 case $- in *i* ) stty hupcl ixon ixoff stty erase '^?' kill '^U' intr '^C' eof '^D' susp '^Z' ;; esac 

Two questions:

1) I know why the erase line exists, since backspace does not work without it. These are the .kshrc lines that I have inherited but don't know what they are doing.

Does anyone know the point of hupcl ixon ixoff lines? The stty man page doesn’t particularly enlighten:

 hupcl (-hupcl) Hang up (do not hang up) modem connection on last close. ixon (-ixon) Enable (disable) START/STOP output control. Output is stopped by sending an ASCII DC3 and started by sending an ASCII DC1. ixoff (-ixoff) Request that the system send (not send) START/STOP characters when the input queue is nearly empty/full. 

2) Is there any other way to check for interactive terminals. I had tty-s; if [$? ], but it also seems noisy over hpux.

+6
source share
2 answers

ixon and ixoff are used to state that Ctrl - s and Ctrl - q are interpreted as flow control (scroll) signals. They are used by default for most systems, but if you have a fast connection and / or do not expect an output volume that your terminal cannot handle, you can disable it.

I usually use stty -ixon -ixoff , so I can return the Ctrl - s and Ctrl - q key bindings for more modern purposes (for example, "save" and "exit").

More details: https://unix.stackexchange.com/questions/12107/how-to-unfreeze-after-accidentally-pressing-ctrl-s-in-a-terminal#12146

+9
source

\ 1.

As you inherited your .kshrc, there may have been a reason why you ever needed these extra options hupcl, ixon, ixoff . Now they may be obsolete, but they may be something that is the focus of HP. Or it may be that some applications work better with them included. Maybe the ol-timer will find out.

Does anyone know the point hupcl ixon ixoff lines

These descriptions are pretty obvious to me, but then I had to deal with problems such as: yyyy back, and read Orielly termcap and terminfo to figure it out. You can look at man ascii to see DC3 and DC1 in their context, or Google search queries may get something interesting.

Now, within a few days, I would expect that if you have no special needs, this will not help you. Do you have special HP hardware or special terminfo applications. If not, try commenting on this line.

\ 2. Test for interactive

I like your case $- in *i* ... , which should be good enough.

else

  if tty -s > /dev/null 2>&1 ; then ... 

may I help

OR canonical

  if [[ -t 0 ]]; then 

Hope this helps.

+1
source

Source: https://habr.com/ru/post/891036/


All Articles