Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263025 - app-shells/bash >= 4.0_p10 prints "^C" to X consoles when pressing CTRL-C
Summary: app-shells/bash >= 4.0_p10 prints "^C" to X consoles when pressing CTRL-C
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 284081 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-19 12:34 UTC by Jens Rutschmann
Modified: 2009-10-21 19:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Rutschmann 2009-03-19 12:34:57 UTC
When updating bash from 3.2* to 4.0_p10 or 4.0_p10-r1 there is a minor annoyance when pressing CTRL-C in an X terminal.

In bash versions 4.0* pressing CTRL-C cancels the running program and additionally prints "^C" to the current line before doing the line break.

Example:
jens:~> ^C          <-- Empty line before pressing CTRL-C
jens:~> 

(whitespace in between is in my $PS1)

Affected are at least KDE's Konsole, from KDE branches 3.5 and 4.2 (didn't test others) as well as x11-terms/xterm-242 (didn't test other versions).
VTs are not affected.

When SSHing into another box the bash version on that box determines the behaviour.

The problem can be reproduced by trying both bash versions 3.2* and 4.0* from ~x86. Other packages don't seem to interfere (I have latest ~x86 packages installed). I could reproduce it on two different machines (laptop + desktop), both running Gentoo.

I realize this might sound ridiculous but it's annoying me. And perhaps this is not the only effect of the bug causing it. Should I open an upstream bug report?
Comment 1 SpanKY gentoo-dev 2009-03-21 11:53:43 UTC
yes, upstream has made decided to make this change.  so if you want to change it back, you'll have to take it up with them.

http://lists.gnu.org/mailman/listinfo/bug-bash/
Comment 2 Roger 2009-09-08 07:18:22 UTC
One word simply describes this bug for me, "stupid".

This breaks easy clip & paste and hinders debugging!!!
Comment 3 Roger 2009-09-08 07:18:43 UTC
*** Bug 284081 has been marked as a duplicate of this bug. ***
Comment 4 Horst Prote 2009-09-29 13:50:26 UTC
> I realize this might sound ridiculous but it's annoying me. And perhaps this is
> not the only effect of the bug causing it. Should I open an upstream bug
> report?
I agree with you that it's annoying. But it seems that you didn't open an upstream bug about it? At least I can't find one.

With bash-3.2_p39 and "stty echoctl" on Ctrl-C is not echoed but e.g. Ctrl-Z:
# sleep 3
^Z
[1]+  Stopped                 sleep 3
# 

With bash-4.0_p28 and "stty echoctl" on Ctrl-C is echoed too:
# ^C
# 
but ^D still is not echoed.

One could however as a workaround now disable all echoing of control chars by setting "stty -echoctl" in ~/.bashrc and that's what I do because the echoing of ^C annoys me more than I miss the ^Z.
Comment 5 Antek Grzymała (antoszka) 2009-10-14 11:45:18 UTC
Apparently this has been fixed in the 4.1 branch. Can we perhaps backport that into 4.0-gentoo?

For now I'm living with the stty workaround, too (and missing ^Z less than hating ^C :)).
Comment 6 SpanKY gentoo-dev 2009-10-14 11:56:11 UTC
you describe the branch like it's something people have access to.  afaik, none of the bash code is stored in a publicly accessible location other than the releases/patches.
Comment 7 Roger 2009-10-21 19:45:32 UTC
The annoying part of the printed "^C" was the fact it would over write previous stdout.

However, slightly less annoying to just seeing it on stdout at all.  But it's probably one of those "nice to see things" if you're reading somebody else's debug log.