[ksh93-integration-discuss] Problems with stty erase <backspace>

Roland Mainz roland.mainz at nrubsig.org
Mon Sep 4 21:36:35 PDT 2006


Bernd Finger - Sun Germany wrote:
> I am using ksh 1993-12-28 r+ on snv_45 and snv_46, both with JDS (Gnome).

Which binaries do you use ? Did you compile them yourself or did you use
one of the tarballs from
http://www.opensolaris.org/os/project/ksh93-integration/downloads/ (if
"yes" - which one ?) ?

> When I
> type a character (gnome-terminal) and press the <backspace> key, the character I
> just typed is erased. However, when logging in remotely using ssh, I just get ^?
> (you all know what I mean).

If you have installed one of the binary packages from our project site -
did you install "/etc/ksh.kshrc", too (this is imporatant since it sets
a "default editor" mode for all interactive shells (/etc/profile is only
for login shells)) ?

What does % set -o | /bin/fgrep on # say in your normal Gnome/JDS
terminal and how does it look like in the ssh session ? Which locale do
you use (e.g. ${LANG} and ${LC_...} vars) ? Is it the same as in the ssh
session ?

> When I then try to use stty erase <backspace> to set that key for erasing
> characters left from the cursor, I get:
> $ stty erase ^?
> [1] + Stopped(SIGTTOU)         stty erase X
> where X is a funny symbol.

Ugh... I've never seen that...
... per /usr/include/sys/iso/signal_iso.h "SIGTTOU" is:
-- snip --
#define SIGTTOU 27      /* background tty write attempted */
-- snip --
... but I can reproduce the problem (with ksh93s-_20060831):
-- snip --
$ /usr/bin/stty erase ^?   
[1] + Stopped(SIGTTOU)         stty erase 
$ jobs
$ ps
   PID TTY         TIME CMD
15093 pts/3       0:00 ksh
 6691 pts/3       0:00 bash
15104 pts/3       0:00 ps
-- snip --
(type "/usr/bin/stty erase <CTRL>v<DEL>" in dtterm (since ksh93r+
"<CTRL>v" can be used as general escape character for any key
combination)),

$ /usr/bin/stty erase $(printf "\x0a\x7f") # fails, too - but only
sometimes. Weired.

> TERM is xterm, and the funny symbol, when redirected to a file, is:
> 
> $ echo ^? > test1
> $ od -ocx test1
> 0000000  005177
>           177  \n
>              0a7f
> 
> I also noticed that the whole backspace key problem when logging in remotely
> does not happen with bash, so instead of fixing the stty erase problem in ksh93,
> I would love to see that bash behavior also in ksh93.
> 
> Any opinions? Anybody already working on it?

Right now I do not even have a clue what is going wrong.
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6185555 is
more or less the closest hit and talks about SIGTTOU, stty and mozilla
hangs.
Another close hit in http://bugs.opensolaris.org is
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6461879 - but
the public bug description does not list SIGTTOU... is there anything
usefull in the non-public bug comments ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the ksh93-integration-discuss mailing list