From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4318 invoked from network); 13 Nov 2022 03:59:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2022 03:59:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668311987; b=d+ZkH543qQa4wsLtLk2rHyaImJ+0GIIs3fv/ZrI0rZoThtKvUEUavODk+N6onNRtK7QGQ9HVHz jMUDzGK9shKOYWsYKmMS/EZbmyXfn6VI7/tGQnTT2x3+4HOTfzreKUnSp3cpMqeb2J+c5n7Zvo n7qCwcG0lCzfA+BW0AuZas35KITQMId7iSDkAjAmWaywkwugSppNDrlLrDvSLBMVjckUNDIL3B oyEL4l8fs+jS4Ob5U5De74GYGeefFK21CsBhIFtiIs+U6cWv3vLRA21xsbJh4ul9Jl7zn+HdUH JSjbx+0A9QPvlhILzzzFlC/B1wUTPmnlq1oJBSLlJspoBA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vs1-f42.google.com) smtp.remote-ip=209.85.217.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1668311987; bh=w2PUKv90svhc7pv7ueYpvlsD7Zk2VABQxCb+fueNzH8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=dTKhsO3yK8br8ZJJ6m3/0QpZnWNgv0tNbepxsgbH2Hu45b3/t125nOHhopIffj3ZLXJH/qQye2 AT1e2wGhF2z/FsJ8oenS/N8vVvFcjrpIQbQ9/pGaiEhZs32ePq/iqQknTsKe9+8EHYeiwLTPoe uEyRTnJ9wh8BCZLX6CrHnqgw1r1+V4a9cuHkG353KUUJkwUS2XRBhxHP/UAHj0+tPAKaXqOaj8 Ie/LW7JWmkTKc1L58qeOYkOmC17c3YWeEBCvDs1Qmzn3XPdK9Enbfs+ZHmExB4e/MoJfjjlHSR zhL8e9gKWa6nd8HPJGUG4IBNJzugGk3kCNimJ8wmII4ttw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=B903u8mZlkZPlUEN00YjszpaKu17ZBxHtV5+bAeBTjA=; b=BSyAL4KhszTR/4dL8WQUNqPuFZ XmkEYb4KcHIzoJhBq7BV81Yw3ai1rIP0isoKvs2FyG0rRfMpJuXHMpXtx6cempuWhqazwkiCyErLT XxuF4vjNPMudNnyP2jG68SPKrMeMLx3/1W2AHWpuqBNezV+heElDZtYNqKCVaXbPcOrXTAnIiLf2c tMnNze6xxqQtmgghIE3E7LdRiJFKghqKn89/GgnB+FVrbmJtpx8gXU24VopDgaZltwaN7r2RPv9Qv ED5sUmL4M5mwJYF8uKuQjP3tDeoadH6brc4Qy9TkGBF+BHqwWwOG8M2+r1jQlRzN9TjiIY2W8O2Yc 1+BmQlxw==; Received: by zero.zsh.org with local id 1ou49p-000Dw6-Ic; Sun, 13 Nov 2022 03:59:45 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vs1-f42.google.com) smtp.remote-ip=209.85.217.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-vs1-f42.google.com ([209.85.217.42]:45704) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ou49J-000DSx-Pz; Sun, 13 Nov 2022 03:59:14 +0000 Received: by mail-vs1-f42.google.com with SMTP id 128so8530070vsz.12 for ; Sat, 12 Nov 2022 19:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=B903u8mZlkZPlUEN00YjszpaKu17ZBxHtV5+bAeBTjA=; b=UFyLVI6DiVq8F/0d6DMYeAOgeSwMv13GgjvMe6H60Z6jipbnaq00PmTQ3zAhX5TI9n 3gtDK+b1zyFHZPxsRuqYSQbQ9fIcP8IhREMkGjqfwtogCz2fj7ijbQeyMuFmY7lkKRrs B9YJhuD7GXVK142EfZKELQWRHAf9lsuF3lvWqrbRTmOUwqpHzm8yU2Y3jldydn0veOA5 50Z59yy+SZfHcWNUsBDnd0uoYALinQwOVPp6dkUQb/ONeSvN030ly3QFdXDQe3dqbbAT huxBv/ZxwvRuVfe4zJGXCgaIepbbcilvmSXQoM3PsRFFCw56XUK/m/+MKtu6B7c0wNAC P/KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B903u8mZlkZPlUEN00YjszpaKu17ZBxHtV5+bAeBTjA=; b=RuqDfe4+Uabx1Fees51jWTziHCQCDQ3TyETWpcjAMtsDUe8MoGw0xYTp7kWU6oNMI3 E5HA863KXazg8iHejlelqf3cXn7gfTCGjtt9gXBVSt0pRMr26y8RdDJO/hiRKSJaCBjI VwFu7fnhGSFaDV+YqfD7GEEOkIa3Eo5/lmMAHvzfAdKqKCoCCPC2wK5GBPLEETCxiGYy HJuaz3a1r+G7MfgdRUFRd/YejLr9SsIgrTRaKjusGccKN+Qdc5jeyWyoaTSovo2RPF6x zbf9rzDlexwcKmJPyW+0cPHFJY0nsDmf5mey+xJUo2vWZFTYQmYCY42GOWe1kfC3BbRW HVXg== X-Gm-Message-State: ANoB5pm5qws+lQAFSTuVHj287nNNEAe4mgtP/w+nrYVi5UndHeLt58tb ffOiRIfA8lfRz8ElQTYzfTjNjp3CbvaenhpGPrdzbaoePqM= X-Google-Smtp-Source: AA0mqf40pzgici5by0WsuTl/M3z+pmGT+LS26zr155K901DtnpOOJKiYwaEh4qShKVx7NvO5B2w+jhTynPxWHUoauws= X-Received: by 2002:a05:6102:3f89:b0:3ad:3da1:3bce with SMTP id o9-20020a0561023f8900b003ad3da13bcemr3727640vsv.67.1668311952089; Sat, 12 Nov 2022 19:59:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Philippe Altherr Date: Sun, 13 Nov 2022 04:59:00 +0100 Message-ID: Subject: Re: [PATCH] More ERR_EXIT (was Re: Tests RE behavior of ERR_EXIT) To: Bart Schaefer , zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="00000000000047660b05ed522511" X-Seq: 50945 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --00000000000047660b05ed522511 Content-Type: text/plain; charset="UTF-8" > > My high-level understanding of exception 3 is that if an error was > produced by a condition (note that the last command in a sub-list is NOT a > condition but a regular command), then that error should bubble up the > evaluation stack, without triggering any ERR_EXIT, until it gets ignored > (for example on the left of a ";" in a sequence) or it becomes the result > of an enclosing function or subshell. In other words, an error produced by a condition should never trigger an ERR_EXIT unless it becomes the result of a function or of a subshell, in which case an ERR_EXIT should be triggered at the calling point of the function or subshell. I assume that command substitutions play the same role as subshells and may turn errors from conditions into ERR_EXITs. However, I assume that they only ever do so if their result isn't ignored. So "v=$(...)" may trigger an ERR_EXIT but never ": $(...)". I added new tests for that and Bash does indeed behave like that. Below is the new set of tests .I dropped the one for always blocks and for sequences, i.e., all the "foo?3" and "foo?4" tests because they don't differ from the "foo?2" tests. I also reordered the tests to better group together the ones that behave correctly. function foo1AX() { init; false > ; } > function foo1AY() { init; v=$(init; false > ); } > function foo1AZ() { init; : $(init; false > ); } function foo1BX() { init; false && true > ; } > function foo1BY() { init; v=$(init; false && true > ); } > function foo1BZ() { init; : $(init; false && true > ); } function foo1CX() { init; false && true ; echo > foo >&2; } > function foo1CY() { init; v=$(init; false && true ; echo > foo >&2); } > function foo1CZ() { init; : $(init; false && true ; echo > foo >&2); } function foo2AX() { init; if true; then false ; fi > ; } > function foo2AY() { init; v=$(init; if true; then false ; fi > ); } > function foo2AZ() { init; : $(init; if true; then false ; fi > ); } function foo2BX() { init; if true; then false && true; fi > ; } > function foo2BY() { init; v=$(init; if true; then false && true; fi > ); } > function foo2BZ() { init; : $(init; if true; then false && true; fi > ); } function foo2CX() { init; if true; then false && true; fi; echo > foo >&2; } > function foo2CY() { init; v=$(init; if true; then false && true; fi; echo > foo >&2); } > function foo2CZ() { init; : $(init; if true; then false && true; fi; echo > foo >&2); } And here are the updated results: Zsh 5.8.1 Zsh 5.9.0.1-dev Bash > 5.1.16(1)-release foo1AX Exit in foo* Exit in foo* Exit in foo* > foo1AY Exit in $() and foo* Exit in $() and foo* Exit in $() and foo* > foo1AZ Exit in $() Exit in $() Exit in $() foo1BX Exit in bar Exit in bar Exit in bar > foo1BY Exit in foo* Exit in foo* Exit in foo* > foo1BZ No exit No exit No exit foo1CX No exit No exit No exit > foo1CY No exit No exit No exit > foo1CZ No exit No exit No exit foo2AX Exit in foo* Exit in foo* Exit in foo* > foo2AY Exit in $() and foo* Exit in $() and foo* Exit in $() and foo* > foo2AZ Exit in $() Exit in $() Exit in $() foo2BX No exit Exit in foo* Exit in bar > foo2BY Exit in foo* Exit in $() and foo* Exit in foo* > foo2BZ No exit Exit in $() No exit foo2CX No exit Exit in foo* No exit > foo2CY No exit Exit in $() and foo* No exit > foo2CZ No exit Exit in $() No exit - Bash behaves correctly for all tests (from my understanding of the POSIX spec). - Zsh 5.8 and 5.9 behave correctly for all "foo1??" and "foo2A?" tests. - For all "foo2B?" and "foo2C?" tests, either Zsh 5.8 and/or Zsh 5.9 behave incorrectly. - Command substitutions don't seem to have any problem (of their own). - In other words, only test foo2BX and foo2CX matter. If they get fixed, I expect the other ones to be fixed too. - The problem seems to be related to how "false && true" interacts with other constructs. - In Zsh 5.9 the problem seems to be that compound commands now incorrectly trigger ERR_EXIT. - In Zsh 5.8 I can't pinpoint the problem, for now. Philippe --00000000000047660b05ed522511 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My high-level understanding of exception 3 is that if an error w= as produced by a condition (note that the last command in a sub-list is NOT= a condition but a regular command), then that error should bubble up the e= valuation stack, without triggering any ERR_EXIT, until it gets ignored (fo= r example on the left of a ";" in a sequence) or it becomes the r= esult of an enclosing function or subshell.

In other words, an error produced by a condition should never trigger an E= RR_EXIT unless it becomes the result of a function or of a subshell, in whi= ch case an ERR_EXIT should be triggered at the calling point of the functio= n or subshell.

I assume that command=C2=A0substitu= tions=C2=A0play the same role as subshells and may turn errors from conditi= ons into ERR_EXITs. However, I assume that they only ever do so if their re= sult isn't ignored. So "v=3D$(...)" may trigger an ERR_EXIT b= ut never ": $(...)". I added new tests for that and Bash does ind= eed behave like that.

Below is the new set of test= s .I dropped the one for always blocks and for sequences, i.e., all the &qu= ot;foo?3" and "foo?4" tests because they don't differ fr= om the "foo?2" tests. I also reordered the tests to better group = together the ones that behave correctly.

function foo1AX() { = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 false =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; }
function foo1AY() { init; v= =3D$(init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 false =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0); }
function foo1AZ() { init; : $(init; =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 false =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0); }
=C2=A0
=C2=A0
fu= nction foo1BX() { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 init; =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 false && true =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; }
function foo1BY() { in= it; v=3D$(init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 false &= ;& true =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)= ; }
function foo1BZ() { init; : $(init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 false && true =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0); }
=C2=A0
=C2=A0
function foo1CX() { =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 false && true =C2=A0 =C2=A0; echo foo >&2; =C2= =A0}
function foo1CY() { init; v=3D$(init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 false && true =C2=A0 =C2=A0; echo foo >&= ;2); }
function foo1CZ() { init; : $(init; =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 false && true =C2=A0 =C2=A0; echo foo >&= ;2); }
=C2=A0
=C2=A0
function foo2AX() { =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 init; if true; then false =C2=A0 =C2=A0 =C2=A0 =C2=A0; fi =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; }
function foo2AY() { init; v= =3D$(init; if true; then false =C2=A0 =C2=A0 =C2=A0 =C2=A0; fi =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0); }
function foo2AZ() { init; : $= (init; if true; then false =C2=A0 =C2=A0 =C2=A0 =C2=A0; fi =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0); }
=C2=A0
=C2=A0
function foo2BX()= { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 init; if true; then false && = true; fi =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; }
function f= oo2BY() { init; v=3D$(init; if true; then false && true; fi =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0); }
function foo2BZ() { init; = : $(init; if true; then false && true; fi =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0); }
=C2=A0
=C2=A0
function foo2CX() { =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 init; if true; then false && true; fi; = echo foo >&2; =C2=A0}
function foo2CY() { init; v=3D$(init; if tr= ue; then false && true; fi; echo foo >&2); }
function foo= 2CZ() { init; : $(init; if true; then false && true; fi; echo foo &= gt;&2); }

And here are the= updated results:


=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Zsh 5.8.1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Zsh 5.9.0.1= -dev =C2=A0 =C2=A0 =C2=A0 =C2=A0Bash 5.1.16(1)-release=C2=A0
=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">f= oo1AX =C2=A0 Exit in foo* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in foo* = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in foo*
foo1AY =C2=A0 Exit in $(= ) and foo* =C2=A0 Exit in $() and foo* =C2=A0 Exit in $() and foo*
foo1A= Z =C2=A0 Exit in $() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in $() = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in $()
=C2=A0
=C2=A0
foo= 1BX =C2=A0 Exit in bar =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in bar= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in bar
foo1BY =C2=A0 Exit= in foo* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in foo* =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 Exit in foo*
foo1BZ =C2=A0 No exit =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit
=C2=A0
=C2=A0
foo1CX =C2=A0 No exit= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit
foo1CY =C2=A0 No ex= it =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit
foo1CZ =C2=A0 No= exit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit
=C2=A0
=C2=A0
foo2AX =C2=A0 Exit in foo* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in foo*= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in foo*
foo2AY =C2=A0 Exit in $= () and foo* =C2=A0 Exit in $() and foo* =C2=A0 Exit in $() and foo*
foo2= AZ =C2=A0 Exit in $() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in $() = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in $()
=C2=A0
=C2=A0
foo= 2BX =C2=A0 No exit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0E= xit in foo* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in bar
foo2BY =C2=A0= Exit in foo* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Exit in $() and foo* =C2= =A0 Exit in foo*
foo2BZ =C2=A0 No exit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0Exit in $() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0No exit
=C2=A0
=C2=A0
foo2CX =C2=A0 No exit =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in foo* =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 No exit
foo2CY =C2=A0 No exit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0Exit in $() and foo* =C2=A0 No exit
foo2CZ =C2=A0 No= exit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Exit in $() = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0No exit
- Bash behaves correctly for all tests (from my understanding = of the POSIX spec).
- Zsh 5.8 and 5.9 behave correctly for all &q= uot;foo1??" and "foo2A?" tests.
- For all &quo= t;foo2B?" and "foo2C?" tests, either Zsh 5.8 and/or Zsh 5.9 = behave incorrectly.
- Command substitutions don't s= eem to have any problem (of their own).
=C2=A0 =C2=A0- In other w= ords, only test foo2BX and foo2CX matter. If they get fixed, I expect the o= ther ones to be fixed too.
- The problem seems to be related to h= ow "false && true" interacts with other constructs.
=C2=A0 =C2=A0- In Zsh 5.9 the problem seems to be that compound co= mmands now incorrectly trigger ERR_EXIT.=C2=A0
=C2=A0 =C2=A0- In = Zsh 5.8 I can't pinpoint the problem,=C2=A0for now.

Philippe
=C2=A0
--00000000000047660b05ed522511--