lkml.org 
[lkml]   [2013]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Large pastes into readline enabled programs causes breakage from v2.6.31 onwards
On 11/23/2013 07:29 PM, One Thousand Gnomes wrote:
>> 7) Rescan line discipline buffer when changing from non-canonical to canonical
>> mode. The real problem with this approach (besides the inefficiency) is that this
>> solution could break some (admittedly unknown) program that contrived to exchange
>> data in non-canonical mode but read in canonical mode (just not exceeding the
>> line discipline buffer limit).
>
> See bugzilla 55981, 55991 btw

Thanks for the bug references, Alan.

The solution proposed in 55991 (to perform an EOF push when switching from
non-canon to canon) would further break paste to readline().

The caller to readline() may not actually perform any read() but may
simply loop, calling readline(); in this case, when readline()
switches back to non-canonical, it will eventually read the inserted '\0'.
That would be bad.

Regards,
Peter Hurley




\
 
 \ /
  Last update: 2013-11-24 13:21    [W:0.069 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site