From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 9C77B2160A for ; Sat, 22 Jun 2024 07:50:35 +0200 (CEST) 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-Transfer-Encoding: Content-Type:Subject:To:From:Date:References:In-Reply-To:Message-Id: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=zvlp4xe/fmi4m7Z89QlBvUzTiu7EZMFNyVTutqMcKdI=; b=gRv0wEJwbNq+fx2iceuh6a+vd9 f3LK1/hMLDCNFn8PtQ8Zu9FmsV1Lo+NK7FMawejlOb8sqVvqVclJaYhDA9dHgwPbPIBdwgOGA6WhB /4IvVGvGfmJ/xf3Rc6R9yxCL3Vxvb64MwG+mgeqwilgnBdEaqmDsLYfIiBVOcwXgj/Rig9jwUG73M 6oyRGHb/UJPtmi0J5ulTegsGKnIniHKnAuQhc4WapkF0C2ZbA0j5KFuu/JmQcFhT4r2dCcUjBMuMe GElfL4psINwMsz9LAglwU9HRcvTVG0Hmt89K66XkrhjoyliD85oehXjhmZeIxtgsUmY2zZwMiYGyd qBkpilhQ==; Received: by zero.zsh.org with local id 1sKtdy-0008Oi-A1; Sat, 22 Jun 2024 05:50:34 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1sKtdg-00085z-V8; Sat, 22 Jun 2024 05:50:17 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfauth.nyi.internal (Postfix) with ESMTP id 49E85120006E for ; Sat, 22 Jun 2024 01:50:15 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Sat, 22 Jun 2024 01:50:15 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeefhedguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgse htqhertderreejnecuhfhrohhmpefnrgifrhgvnhgtvgcugggvlhojiihquhgviicuoehl rghrrhihvhesiihshhdrohhrgheqnecuggftrfgrthhtvghrnhepgfffgefhheejgedtie dtveegheegheejfefffeeffeeigeeuvddtgedtteduueefnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhihvodhmvghsmhhtphgruh hthhhpvghrshhonhgrlhhithihqdduudehudekjeejtdegqdduudelvdejfeekhedqlhgr rhhrhihvpeepiihshhdrohhrghesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 08BBD31A0065; Sat, 22 Jun 2024 01:50:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-522-ga39cca1d5-fm-20240610.002-ga39cca1d MIME-Version: 1.0 Message-Id: <33ca21c3-69f8-49f7-9350-2ff9cc4febca@app.fastmail.com> In-Reply-To: References: <5d54375e-8673-45f0-b5ac-f5e0e233d56f@inlv.org> <2a5f0fa7-23bf-4069-b237-d304965f142e@app.fastmail.com> Date: Sat, 22 Jun 2024 01:49:54 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: zsh-workers@zsh.org Subject: Re: errexit and (Z)ERR trap regression Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 52972 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: On Fri, Jun 21, 2024, at 4:36 PM, Bart Schaefer wrote: > On Fri, Jun 21, 2024 at 1:03=E2=80=AFPM Lawrence Vel=C3=A1zquez wrote: >> >> The full description of "set -e" in the fresh-out-of-the-oven >> POSIX.1-2024 is: >> >> This requirement applies to the shell environment and each >> subshell environment separately. For example, in: >> >> set -e; (false; echo one) | cat; echo two >> >> the `false' command causes the subshell to exit without >> executing `echo one' > > Hm, that doesn't directly address something like > > set -e; true && (false; echo one) || echo two > > If the subshell should execute "echo one" then the parent should not "= echo two". Right, because early exit is suppressed in the non-final portions of the AND-OR list and is not reenabled in the subshell. All of bash, dash, ksh, mksh, yash, and the Solaris 10 Bourne shell print "one" here. > Unfortunately I don't follow how any of the POSIX.1-2024 text is meant > to apply to > > set -e; true && { false; echo one; } || echo two > > Is "false" there considered to be "any command of an AND-OR list" ? This ought to work the same as the subshell version: early exit is suppressed for the commands "true" and "{ false; echo one; }", so the overall output is still "one". The aforementioned shells behave this way. --=20 vq