bin/169773: sh(1): Resizing causes /bin/sh to repeat edit operations

Mark Johnston markjdb at gmail.com
Mon Sep 10 15:59:40 UTC 2012


On Mon, Sep 10, 2012 at 04:56:35PM +0200, Steffen Daode Nurpmeso wrote:
> 
> I have implemented a EL_READRESTART option for editline(3), which
> seems to be the easiest approach to get around this.
> Other options would have been to implement an el_gets_continue(),
> which would have restarted editing with the input of the last
> state (but what if that ended in a newline?), or to commit suicide
> while trying to deal with signals from within sh(1).
> 
> I have also tried to extend editline.3 in respect to
> EL_UNBUFFERED, which is only partially documented sofar, and the
> yet completely undocumented errno handling.
> 
> It is a whole series of local commits indeed, but i don't dare to
> attach a MBOX or even (horror) send a patch mail-series, and so
> i'll simply attach them in order, including the PR bin/170651
> patch (laziness).  It seems to work.  In reversed order:
> 
>   - 6.diff: Set EL_READRESTART in interactive sh(1) sessions
>   - 5.diff: Add a new EL_READRESTART option for editline(3)
>   - 4.diff: Document errno behaviour of el_getc()/el_gets()
>   - 3.diff: Document EL_UNBUFFERED for el_set()
>   - 2.diff: Fix editline(3) char read and errno code flow
> : This simply reuses your patch.
>   - 1.diff: Fix PR bin/170651
> : (The plain patch.  Maybe possible to leave that off.)

I didn't test 1.diff, but the rest of the patches apply and work for me.

Thanks,
-Mark


More information about the freebsd-bugs mailing list