Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11634

Re: Continue behavior in devel branch

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Carlos Pita <carlosjosepita@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Continue behavior in devel branch
Date Mon, 12 Oct 2015 17:44:47 -0300
Lines 64
Approved bug-bash@gnu.org
Message-ID <mailman.171.1444682710.7904.bug-bash@gnu.org> (permalink)
References <CAELgYhdOLxMzgsZEmiDZ0x3vLgn5m5_u=FL74OAHuspJgUevoQ@mail.gmail.com> <5619421B.5070203@case.edu>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace usenet.stanford.edu 1444682711 23945 208.118.235.17 (12 Oct 2015 20:45:11 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Chester Ramey <chet.ramey@case.edu>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ibg4ukpxNvCQDlZooqLR2voS2rctF6p/cVHBb6gqT0E=; b=EzG9mwj5oJ8vDfZSzpFANLkEs/cFZV2fcxVcANmcIJQs1L1VlHK6tVWoDF33lGD+gT C3T96b14x/3Bhp1djlBdZTIh00ffXqUtfO/bpHbUHO5wUlucADGIx3eog991ENMo4L9n dTN7y2CRZq1vRkb1H4wtussFYESrTAmQYr/+B2ezn3BuGxgnigPezneTTq7+EjWBtv/L 0EnD2X468u8EkCjFeZfg9Qt7Mg9KisNXiMVWuqN0RBTTLIC1E7MI03eQcQEhNWyEVhFO 3EdDzwXsTzdkaWSj3isFIiW1WauyqNq2NtaAqrkX00jIV0PTZ8OINgogVCuVxYqxUd4B V0Cw==
X-Received by 10.60.118.40 with SMTP id kj8mr16791976oeb.5.1444682707101; Mon, 12 Oct 2015 13:45:07 -0700 (PDT)
In-Reply-To <5619421B.5070203@case.edu>
X-detected-operating-system by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value).
X-Received-From 2607:f8b0:4003:c01::229
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11634

Show key headers only | View raw


Ok, I see. Thank you for the answer.

I've already found a program (yaourt) that wreaks havoc because of
this, I gave its developers a heads up.

The cause of my question is that I want to use your readline devel
branch. First, I thought I would need to use the bash devel branch
too, but then I realized that just recompiling the stable branch
against readline devel would be enough. So the disruptive continue
behaviour is not really an issue for me, as I've thought at first.
Nevertheless, there is still the problem of recompiling and replacing
the system-wide /bin/bash because most of the bash scripts will use
it. This is easy in my arch linux but not so easy in production
servers where I use readline a lot.

Do you have plans to backport the improvements in readline that
doesn't require a change in the binary interface? If not, would it be
too difficult to do it myself?

Cheers
--
Carlos

On Sat, Oct 10, 2015 at 1:51 PM, Chet Ramey <chet.ramey@case.edu> wrote:
> On 10/10/15 9:36 AM, Carlos Pita wrote:
>> Hi Chet,
>>
>> consider the following program:
>>
>> yyy() {
>>   continue
>> }
>>
>> xxx() {
>>   while true; do
>>     echo x
>>     yyy
>>     echo y
>>     break
>>   done
>> }
>>
>> xxx
>>
>> In the bash devel branch it will ignore the continue and echo
>>
>> x
>> y
>
> The change was made intentionally.  Historical versions of sh ignore (or
> more precisely reset) the loop state when entering a shell function, so
> the continue doesn't have any effect.  Posix doesn't say anything specific
> about it, but it doesn't call out a change from the historical behavior,
> so it came up reported as a bug.
>
> The discussion about the change took place on the dash mailing list,
> but the gmane.org archives are down right now so I can't give you a URL.
>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Continue behavior in devel branch Carlos Pita <carlosjosepita@gmail.com> - 2015-10-12 17:44 -0300

csiph-web