Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2012 11:58:54 -0400
From:      Mark Johnston <markjdb@gmail.com>
To:        Steffen Daode Nurpmeso <sdaoden@gmail.com>
Cc:        jilles@FreeBSD.org, freebsd-bugs@FreeBSD.org, eadler@FreeBSD.org, bug-followup@FreeBSD.org
Subject:   Re: bin/169773: sh(1): Resizing causes /bin/sh to repeat edit operations
Message-ID:  <20120910155854.GA1676@oddish.uwaterloo.ca>
In-Reply-To: <504dffa3.fS2d0si9erBWOIHKQIFk0edM@dietcurd.wild-life.local>
References:  <201209061926.q86JQwAC087821@freefall.freebsd.org> <504b67f8.hU%2BoKTUxDdq8oHD59qxE1DdF@dietcurd.wild-life.local> <20120908212944.GA39382@raichu.mark-home> <504dffa3.fS2d0si9erBWOIHKQIFk0edM@dietcurd.wild-life.local>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120910155854.GA1676>