Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Shell echo missing after ctrl+c
Date: Mon, 20 Mar 2017 02:21:03
Message-Id: acae503a-39d0-bf26-faf7-d0be78e2ca03@gmail.com
In Reply to: Re: [gentoo-user] Shell echo missing after ctrl+c by Walter Dnes
1 Walter Dnes wrote:
2 > On Sun, Mar 19, 2017 at 09:49:50AM +0100, Kai Krakow wrote
3 >> Hello!
4 >>
5 >> More and more of my Gentoo systems are exhibiting the following
6 >> strange and unexpected behavior:
7 >>
8 >> After ctrl+c'ing out of programs like tailf, SSH password prompts, in
9 >> the middle of a shell scripts, the shell echo is not restored - that
10 >> is: If I type characters I no longer see the characters (but they are
11 >> received and can be executed by "enter"). If experiencing this, I have
12 >> to ctrl+c again to discard what I was typing, the blindly type "reset"
13 >> to reset the terminal, then echo is enabled again.
14 > "It's not a bug; it's a feature". It's caused by some programs. See
15 > http://askubuntu.com/questions/171449/shell-does-not-show-typed-in-commands-reset-works-but-what-happened
16 > for a detailed explanation. Executive summary... some programs, e.g.
17 > vim, can be run from the command line, and they accept certain control
18 > characters (CTRL-V, CTRL-I, etc) as valid input. These characters would
19 > normally be echo'd back to the user's terminal by the kernel's tty
20 > subsystem. This would foul up the application's screen display. To
21 > avoid that, the application turns off echoing to the tty when it starts
22 > up. It also restores echoing ***IF IT EXITS PROPERLY***. This also
23 > applies to when a program issues a password prompt, where you obviously
24 > want echoing turned off. If killed with CTRL-C or "kill -9" or "kill
25 > -15", it doesn't have a chance to restore echoing, and you get the
26 > situation you described.
27 >
28
29
30 So, it was intentional. Why am I not surprised. It's still annoying.
31 I can see why they did it based on your post but it's still annoying.
32
33 Dale
34
35 :-) :-)