[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] [PATCH] rl_read_key: don't inject a line break in cas
Re: [Bug-readline] [PATCH] rl_read_key: don't inject a line break in case of an I/O error
Sun, 23 Aug 2015 22:34:56 -0400
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
On 8/20/15 11:35 AM, Lubomir Rintel wrote:
> When a terminal disappears (and SIGHUP is blocked), attempt to peek into the
> input buffer results in an EIO. We should not pretend it's an ordinary line
> break, since then the caller would likely try to read another line, resulting
> in an endless loop. Insert a READERR instead: readline_internal_char() treats
> that as an EOF and communicates to the caller properly.
Thanks for the report. This is the right place to look at a fix, but
READERR only works correctly when readline is reading a command.
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/