Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Shell echo missing after ctrl+c
Date: Mon, 20 Mar 2017 02:09:52
Message-Id: 20170320020924.GA16112@waltdnes.org
In Reply to: [gentoo-user] Shell echo missing after ctrl+c by Kai Krakow
1 On Sun, Mar 19, 2017 at 09:49:50AM +0100, Kai Krakow wrote
2 > Hello!
3 >
4 > More and more of my Gentoo systems are exhibiting the following
5 > strange and unexpected behavior:
6 >
7 > After ctrl+c'ing out of programs like tailf, SSH password prompts, in
8 > the middle of a shell scripts, the shell echo is not restored - that
9 > is: If I type characters I no longer see the characters (but they are
10 > received and can be executed by "enter"). If experiencing this, I have
11 > to ctrl+c again to discard what I was typing, the blindly type "reset"
12 > to reset the terminal, then echo is enabled again.
13
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 Walter Dnes <waltdnes@××××××××.org>
30 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] Shell echo missing after ctrl+c Dale <rdalek1967@×××××.com>
[gentoo-user] Re: Shell echo missing after ctrl+c Ian Zimmerman <itz@×××××××.net>