You are not logged in.

#1 2014-04-24 10:18:13

Arakis
Member
From: Hamminkeln - Germany
Registered: 2013-08-11
Posts: 42
Website

readline produces control chars in some scenarios

Hello,
since some months, i have the problem, that in some scenarios control chars are written.

Example:
$ yaourt <search phrase>

After the list is complete, i should enter a number. When pressing CTRL+C, yaourt should be terminated. (it was so in the history). But, only "^C" will be written, it will not terminated. The "^C"'s ware not removable via backspace.

Sometimes (i found no way to "safely" reproduce this"), after exiting yaourt, my command line is "broken". When pressing the up-key, i see control chars, and the enter-key do not work always on input's. I need to close the terminal and reopen it.

Some facts:
- It's not an yaourt-only problem, because even the normal shell is broken after exiting it (only in rare scenarios, i described it above). But....it "happens" only after using yaourt.
- It occurs first time after an system upgrade, but not after an yaourt-upgrade itself. I tried to upgrade it after this issue, but it does not resolved it. I can't check wich package is the matter...its too long ago.
- It's not an problem of the terminal (xfc4-termianl) or shell (zsh with presto): When running "$ xterm bash", this problem occurs, too.
- It occurs on native virtual terminal (text mode only), too.
- I reinstalled with --force the package "readline" and "yaourt".
- the /etc/inputrc is not modified. There's no local .inputrc, same with yaourtrc.
- password prompts to not work after the problem occurs (restart shell solve this)

Here's an example of the location in the yaourt script, after this issue occurs:

prompt $(gettext 'Enter n° of packages to be installed (ex: 1 2 3 or 1-3)')
read -ea packagesnum

starting bash and typing "read -ea packagesnum" will work as expected.

I found the same/similar issue here:
https://github.com/archlinuxfr/yaourt/issues/11

But in my case, it occurs in bash, too.

So, how can a application break an underlinding shell? This should not be possible. Is this now a bug of the shell environment (for example readline) or yaourt?

Greetings from Germany,
Sebastian

Last edited by Arakis (2014-04-24 10:37:52)

Offline

#2 2014-04-25 08:45:12

develop
Member
Registered: 2014-04-25
Posts: 14

Re: readline produces control chars in some scenarios

Hello from neighbouring Poland smile

Strange but Ive just checked that and this must be a bug in bash. Maybe its worth placing it on bugzilla?

Greetings,

Offline

#3 2014-04-25 14:03:35

Arakis
Member
From: Hamminkeln - Germany
Registered: 2013-08-11
Posts: 42
Website

Re: readline produces control chars in some scenarios

Hello develop,
greetings to Poland! smile

You have the same error? Good, than i'm not the only one. By the way, i have this problem on "every" machine.

Let's assume, it's bug in bash (because yaourt is written in bash), how it can effect the underlining shell (in my case zsh)? (as i wrote, sometimes, even after exiting yaourt, the shell is broken, too.).

Maybe an environment variable was changed? Wich variable could occur this behavior?

I could open a issue on the bash issue tracker....but it occurs only in yaourt, and i'm sure they can't use yaourt on "their" machines smile

Greetings,
Sebastian

Offline

#4 2014-06-20 11:48:40

trunneml
Member
From: Germany Stuttgart
Registered: 2010-02-09
Posts: 21

Re: readline produces control chars in some scenarios

Hi,

i've got the same problem. Did you find a solution?

Greez

Michael

Offline

#5 2014-06-20 12:14:56

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,688
Website

Re: readline produces control chars in some scenarios

Start narrowing it down.  It sounds like you have narrowed it down to that one read command (though you haven't specified how).  See if you can take yaourt out of the equation: does that read command on it's own (or a bash script with just those two lines) lead to the same problem? (note: prompt is a yaourt function, I gather, so you'd have to include that function).

Last edited by Trilby (2014-06-20 12:15:54)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

Board footer

Powered by FluxBB