Hmmm.... very curious. I see that the backspace key is generating #127. This is true for iTerm on Mac and PuTTY on Windows. ASCII table says #127 is DEL. When I press the DEL key on my keyboard, it generates an escape sequence. So there is a bit of mixup there that is not a YottaDB issue.
I agree that the ASCII backspace (BS), #8 is always captured.
To investigate if this is a linux issue, I did some research and came up with this command:
strace -o debug.txt -f -ff -e trace=read,write ~/runAV
runAV is the script that normally launches our YottaDB. The strace command will show system calls to and from a program.
After YottaDB launched, I pasted this code in:
F I=1:1:5000 READ *X:0.01 W:X>0 X,! HANG 0.1
I then typed 'a','b','c' and struck the backspace key 10 times. I think I was able to capture a 127 two times.
I then halted and examined the debug files.
...
read(0, "\r", 1) = 1 <---- here I pressed enter to start executing code line
write(0, "\33[?1l\33>", 7) = 7
write(0, "\n", 1) = 1
read(0, "a", 1) = 1 <-- here I typed 'a'
write(0, "a", 1) = 1
write(0, "97\n", 3) = 3
read(0, "b", 1) = 1 <-- here I typed 'b'
write(0, "b", 1) = 1
write(0, "98\n", 3) = 3
read(0, "c", 1) = 1 <-- here I typed 'c'
write(0, "c", 1) = 1
write(0, "99\n", 3) = 3
read(0, "\177", 1) = 1 <--- here is where I started pressing BACKSPACE key 10 times.
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <--- notice that only 2 instances of 127 are read
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} --- <--- here I typed CTRL-C to break the loop
write(0, "%YDB-I-CTRLC, CTRL_C encountered"..., 33) = 33
write(0, "\n", 1) = 1
write(0, "\r", 1) = 1
write(0, "yottadb>", 8) = 8
write(0, "\33[?1h\33=", 7) = 7
read(0, "h", 1) = 1 <-- starting to type halt
write(0, "h", 1) = 1
write(0, "\10", 1) = 1
write(0, "\33[C", 3) = 3
read(0, "a", 1) = 1
write(0, "a", 1) = 1
write(0, "\10", 1) = 1
write(0, "\33[C", 3) = 3
read(0, "l", 1) = 1
write(0, "l", 1) = 1
write(0, "\10", 1) = 1
write(0, "\33[C", 3) = 3
read(0, "t", 1) = 1
write(0, "t", 1) = 1
write(0, "\10", 1) = 1
write(0, "\33[C", 3) = 3
read(0, "\r", 1) = 1
write(0, "\33[?1l\33>", 7) = 7
write(0, "\n", 1) = 1
+++ exited with 0 +++
Next, I repeated the test with the shorter hang time:
F I=1:1:5000 READ *X:0.01 W:X>0 X,! HANG 0.001
and here it the debug log from that:
read(0, "\r", 1) = 1 <-- return to start code
write(0, "\33[?1l\33>", 7) = 7
write(0, "\n", 1) = 1
read(0, "a", 1) = 1 <-- a
write(0, "a", 1) = 1
write(0, "97\n", 3) = 3
read(0, "b", 1) = 1 <-- b
write(0, "b", 1) = 1
write(0, "98\n", 3) = 3
read(0, "c", 1) = 1 <-- c
write(0, "c", 1) = 1
write(0, "99\n", 3) = 3
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
read(0, "\177", 1) = 1
write(0, "\177", 1) = 1
write(0, "127\n", 4) = 4 <-- reads 127
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
write(0, "%YDB-I-CTRLC, CTRL_C encountered"..., 33) = 33
Thus Mark may be on to the real problem here. It seems that YottaDB never is able to read the 127 with the longer hang time.
I'll next research how to modify the way linux is handling this.
Thanks
KT