Messages in this thread | | | Date | Sun, 24 Nov 2013 06:55:27 -0500 | From | Peter Hurley <> | Subject | Re: 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
| |