palaniyappanBala / klish

Automatically exported from code.google.com/p/klish
Other
0 stars 0 forks source link

Terminal mode didn't restore back to canonical behaviour #127

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the clish executable, in my case: bin/clish -x 
xml-examples/klish/etc/clish
2. issue "enable" command following the Prompt, in my case: > enable 
3. press ctrl+c to interrupt processing after authentication is required, in my 
case: 密码:(ctrl+c goes HERE)>
4. exit clish shell: > exit

What is the expected output? What do you see instead?
In the same terminal, any key pressed should be echo at the terminal, however 
nothing happened now whatever press. 

What version of the product are you using? On what operating system?
klish-1.6.4 and Fedora 16

Please provide any additional information below.
when I inspect the attribute of the terminal in another terminal, I observed 
the following result:
[yrming@localhost klish-1.6.4]$ w
 09:39:49 up 34 min,  3 users,  load average: 0.01, 0.05, 0.12
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
yrming   tty2     :0               09:06   34:10  48.80s  0.03s gdm-session-wor
yrming   pts/0    :0               09:06    3:34   0.29s  0.29s bash
yrming   pts/1    :0               09:20    0.00s  0.11s  0.00s w
[yrming@localhost klish-1.6.4]$ stty -F /dev/pts/0
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?; lnext = <undef>; min = 1; time = 0;
-icrnl ixany iutf8
-icanon -echo
[yrming@localhost klish-1.6.4]$ stty -F /dev/pts/1
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?;
ixany iutf8

Obviously attributes of virtual terminal pts/0 are strange since clish has 
exited.

I don't think the issue is critical, however it's a problem, right? Sometimes 
people forget the password of root may decide abort the enable command, they 
will encounter the problem at last. 

FYI and hope it can be fixed. :)

Original issue reported on code.google.com by yrm...@gmail.com on 12 Mar 2013 at 2:21

GoogleCodeExporter commented 8 years ago
I can't reproduce the problem. My su (while 'enable' command) blocks ctrl^c and 
do nothing. But i have found a possible cause of broken tty. So try to use the 
attached patch and write back if it works. Then i'll commit the patch to 
repository.

Original comment by serj.kalichev@gmail.com on 12 Mar 2013 at 9:40

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, Serj:

Thanks for quick response.

After applying the patch, according to my tests, the problem is gone.

BTW, when describing the procedures to reproduce it, I forgot to change my
locale, so when anthentication requires, it printed "����" instead of
"password". Sorry for that.

Yurui

Original comment by yrm...@gmail.com on 13 Mar 2013 at 2:15

GoogleCodeExporter commented 8 years ago
Hi. It was fixed in git repository. Thanks for bug report.

Original comment by serj.kalichev@gmail.com on 13 Mar 2013 at 7:40