From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 10 15:59:40 2012 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 595FE106566C; Mon, 10 Sep 2012 15:59:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id E9D598FC14; Mon, 10 Sep 2012 15:59:39 +0000 (UTC) Received: by iebc12 with SMTP id c12so4317319ieb.13 for ; Mon, 10 Sep 2012 08:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/C1IVeaEGvTPMIcmoCWvYyqp0e6uhECjJMLfD2BZr8c=; b=J/MyXDszkzS0MOixXCQOk0jTr8XacgCz6jlGVTNHBZO4TSFidzMHNHq9jGP+NLpvN2 Q7J6RdLBLuIliYDisKTF7Em1Tezv2KWcwqsgJjzUUgC8nAZLVuBAy+7i7u+fr0FsDY+c APkflY1zzhfTWqVe0ua9ozFeauUDo8GRCOBVT0Aze/Vp+YbSFDJugmirKwG63Xhn1YPD O0MOy+e3znLR4KPkvMITWSCL/C8GA/8MGfpejWMU0L/J/Pm3Y8pIhQgdoHnO3+4JaawV SUZc5i2rnhq0MR1uG711SynMccBWlV62uzwKGhCm+Mg2vuT40mkcFUaJ1w8VTKLcUNq/ KkXg== Received: by 10.50.95.231 with SMTP id dn7mr12099665igb.36.1347292779470; Mon, 10 Sep 2012 08:59:39 -0700 (PDT) Received: from oddish.uwaterloo.ca (cn-nat2-uw-129-97-124-32.dynamic.uwaterloo.ca. [129.97.124.32]) by mx.google.com with ESMTPS id i17sm12185077igd.5.2012.09.10.08.59.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Sep 2012 08:59:38 -0700 (PDT) Date: Mon, 10 Sep 2012 11:58:54 -0400 From: Mark Johnston To: Steffen Daode Nurpmeso Message-ID: <20120910155854.GA1676@oddish.uwaterloo.ca> References: <201209061926.q86JQwAC087821@freefall.freebsd.org> <504b67f8.hU+oKTUxDdq8oHD59qxE1DdF@dietcurd.wild-life.local> <20120908212944.GA39382@raichu.mark-home> <504dffa3.fS2d0si9erBWOIHKQIFk0edM@dietcurd.wild-life.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504dffa3.fS2d0si9erBWOIHKQIFk0edM@dietcurd.wild-life.local> User-Agent: Mutt/1.5.21 (2010-09-15) 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 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 15:59:40 -0000 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