Closed GoogleCodeExporter closed 8 years ago
Hi
I can't reproduce it.
I have tried on Ubuntu.
I have tried on Ubuntu with ssh to another Ubuntu.
Additionaly the output of [C [D and another unknown characters was disabled in
1.6.7 release.
Please try it on Debian itself or with ssh from another Linux to Debian.
I'm not sure but probably it's problem of Windows terminal or ssh client.
Original comment by serj.kalichev@gmail.com
on 24 Jan 2014 at 9:59
Hi Serj,
Thanks for trying it! I'm going to try again and will get back to you with more
details.
It also happens to me when I press quickly an arrow.
Original comment by corent...@gmail.com
on 24 Jan 2014 at 9:39
Hello Serj,
I tried it directly on the system and it works find.
However, I am getting the error when I ssh.
Could you try to ssh in your system? (I ssh from windows).
Do you use windows? If so, which terminal do you use to ssh into a linux
system. What configuration?
I have the issue in Klish but not on bash. I don't know what is done
differently between the two.
Thanks!
Original comment by corent...@gmail.com
on 4 Feb 2014 at 12:04
I figured out a potential issue (I think):
in tinyrl/vt100/vt100.c, line 76. There is a potential race condition between
writing into stdin and reading using fgetc.
If we get an escape character. We start in the loop. If the [ and letter(A to D
for arrows) hasn't been received, then it will cancel the escape, discarding
the [ if it received one (which explains why sometimes it prints [D and
sometimes D))
Welcome to Clish
> [DD[D[D[DD[D[DD
We need some kind of timeout mechanism in that while loop so we wait a little
bit if we don't get an expected character.
Original comment by corent...@gmail.com
on 4 Feb 2014 at 2:42
I wrote a patch for it.
I don't know how to run UT on it.
Let me know if I should create a login on libcode and push it to the repo or if
you are going to do it.
Let me know how testing goes too :)
Original comment by corent...@gmail.com
on 4 Feb 2014 at 5:44
Attachments:
Hello.
I don't use Windows. May be I'll boot it on virtual machine while testing.
Thanks for the patch! You have show the possibility of races.
But note klish has a timeout feature. When no key is pressed for a long time
the klish will exit automatically. It's implemented for the case when admin
didn't close the session and then gone away.
Cause of this feature the klish can't be blocked without timeout. I use
select() in tinyrl_vt100_getchar() to implement timeout. Probably it will be
good to use tinyrl_vt100_getchar() instead the fgetc(). I'll inspect it in a
several days when I have some free time for this.
Thanks.
Original comment by serj.kalichev@gmail.com
on 5 Feb 2014 at 6:36
Hi
I have made some fixes to tinyrl. It still hard for me to reproduce the problem
without windows. Please try the latest klish GIT revision (1.6 or master
branch).
Original comment by serj.kalichev@gmail.com
on 15 Feb 2014 at 3:16
Hello,
I checked out master.
I am not able to reproduce anymore. Good job fixing it!
Thanks!
Co
Original comment by corent...@gmail.com
on 16 Feb 2014 at 8:15
Original comment by serj.kalichev@gmail.com
on 17 Feb 2014 at 7:39
Original issue reported on code.google.com by
corent...@gmail.com
on 24 Jan 2014 at 1:18