bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6k buffer bug in shells


From: Chet Ramey
Subject: Re: 6k buffer bug in shells
Date: Fri, 2 Feb 2018 15:19:04 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2/2/18 9:50 AM, Sten Westerback wrote:
> Hi
> 
> After trying to figure out what causes a weird bug, which i can see with 
> lots of shells and connection types (local terminal on linux, ssh + 
> numerous shells on AIX and putty (linux & windows)+numerous shells on AIX) 
> i though i would ask makers of my favorite shell.
> 
> The problem is that when i paste in longer texts instead of just typing 
> the result isn't as expected. It seems that after a certain amount of 
> characters the shell drops a few characters but then continues. The number 
> of characters dropped depends on the line with (with 50 it's 4, with 64 it 
> was 12 etc). And with slightly larger amounts of text there is also a 
> pause before it continues while one would expect the flow to be continous 
> with a simple task like this,

It's not quite as simple as you think. If you're pasting into an
interactive shell without turning off line editing, you have to deal with
the kernel turning character-at-a-time mode on and off for each line (and
the single-character reads line editing requires). In the past, we've found
that doing this causes characters to be discarded.

This is part of the problem that `bracketed paste' mode was intended to
address.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]