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 A299421C2D for ; Fri, 21 Jun 2024 22:03:25 +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-Type:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=zlWJmSuEX1vsuTgUHhlkcGZSkvMRXlzbZQP3eI87zxs=; b=HvUIwWFRaUKQyQiY6Z2KpWo1Z2 hT3N5Edv8Iy3qOVCeR+Ncq3ki0yEsw6L5hXMB+DBmr2e7+Z9/yXUh12NePGUdCZPvqawuVjpCetpB dlhiZ8v7Lm9zUcN8LVwmTTMMNQ+xapYZsZJ1423mOfnSl1BVTICVY8Ou9M7D5bs9YGe20XwoJP0tb C5ZUZXfsVafLLcZqapGXLAm2c3uZ1JTpm0xLASPF77DrHnN7CTZ5W52x/AJxGeQDpAaMMaN5mazoK OYQyRkf3fgS1e4rKFDBFGCe3a3EDfjreQFTu816YFUYvIfmV3uDZBTEjmlTWlfC+bTFFgJ7L5MpWw 8nOjBP8Q==; Received: by zero.zsh.org with local id 1sKkTk-000GmY-FZ; Fri, 21 Jun 2024 20:03:24 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1sKkTQ-000GT2-A1; Fri, 21 Jun 2024 20:03:05 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfauth.nyi.internal (Postfix) with ESMTP id 7C8B91200068; Fri, 21 Jun 2024 16:03:02 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Fri, 21 Jun 2024 16:03:02 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeefgedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreerjeenucfhrhhomhepnfgr fihrvghntggvucggvghljoiiqhhuvgiiuceolhgrrhhrhihvseiishhhrdhorhhgqeenuc ggtffrrghtthgvrhhnpeejvefhtdeivedvteffkeehtdekieejkedttdejhffhieffhfel ffffleegtdekkeenucffohhmrghinheprghushhtihhnghhrohhuphgsuhhgshdrnhgvth enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghr rhihvhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduhedukeejjedtge dqudduledvjeefkeehqdhlrghrrhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdr tghomh X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3D32131A0065; Fri, 21 Jun 2024 16:03:02 -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: <2a5f0fa7-23bf-4069-b237-d304965f142e@app.fastmail.com> In-Reply-To: References: <5d54375e-8673-45f0-b5ac-f5e0e233d56f@inlv.org> Date: Fri, 21 Jun 2024 16:02:42 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Bart Schaefer" Cc: zsh-workers@zsh.org Subject: Re: errexit and (Z)ERR trap regression Content-Type: text/plain X-Seq: 52970 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 2:46 PM, Bart Schaefer wrote: > Is my recollection incorrect, that there's a change related to this in > the as-yet-unpublished next revision of POSIX? There is a change, but it doesn't seem to be relevant here: https://www.austingroupbugs.net/view.php?id=1150#c4184 The full description of "set -e" in the fresh-out-of-the-oven POSIX.1-2024 is: -e When this option is on, when any command fails (for any of the reasons listed in Section 2.8.1 or by returning an exit status greater than zero), the shell immediately shall exit, as if by executing the `exit' special built-in utility with no arguments, with the following exceptions: 1. The failure of any individual command in a multi-command pipeline, or of any subshell environments in which command substitution was performed during word expansion, shall not cause the shell to exit. Only the failure of the pipeline itself shall be considered. 2. The `-e' setting shall be ignored when executing the compound list following the `while', `until', `if', or `elif' reserved word, a pipeline beginning with the `!' reserved word, or any command of an AND-OR list other than the last. 3. If the exit status of a compound command other than a subshell command was the result of a failure while `-e' was being ignored, then `-e' shall not apply to this command. 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'; however, `echo two' is executed because the exit status of the pipeline `(false; echo one) | cat' is zero. In set -e; echo $(false; echo one) two the `false' command causes the subshell in which the command substitution is performed to exit without executing `echo one'; the exit status of the subshell is ignored and the shell then executes the word-expanded command `echo two'. -- vq