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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 94D942727D for ; Thu, 27 Jun 2024 19:10:33 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1719508233; b=o5P1E3fzTa8MJJ4fUn8qe4iZMOAo8lXHHKD5Ca4U1c8WQ20cTfc5oeks+XIwt20Mq7Bv4nsmto CBpICr4DiEcxNajUmtIsuA1FgIc3HxEMLkxonrQj87VlHsWwZeABdUsc96kP5+vTZSzR5O2N7H 9nbwcix/2Hbbs8ZIsJ5SOQKXmoZyqJFyJNrxwWhWRuWKN8XiZQLAzO/Ehq4lQhP7bFmsacGUR1 gQ5Jbv4jpI5NBVdpOg1/zyR1zrn/D6BkimfywlJweh/jSd6uyUtGY1VM+DWl53dHSddjZ75WW6 cJlGQtMYsIkwjZ8EkumnnLrEaqCm/toB1FiXiA2Fq0zFJw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f45.google.com) smtp.remote-ip=209.85.208.45; dkim=pass header.d=gmail.com header.s=20230601 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=1719508233; bh=JhAFYoqlgO4qDfcZHY0g4VsLnoxZoEZgqY76H2Wo8OY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=hk97eotK1mSLSyfg6sSK2z08FIqefzOjBAY96tCLOXauM8QV30oskZVJMz8WwPUzlHLt4aj4MW Vn1mYFWxNuk2FZ7aXRaITFYEd3XedQfKJGrE4UXD4ZPWlT6WCGFuOdGhUy2OzE9R9NeuUQZ8mg YrTG2fIOZG8+PbobAOI12VhnsjSQoOVz8wov46YwyeiBJQJuf4yov0Ao1zxObyyvlb+RVeNbId j7j1gr0VkNCuigI/vopRikQ8XXFGhUGLzGZ2DvMBzkiqAxF2gWXFeUCNU3q2pOND59pjgYPy0w DaCmZMR/FeufN08DEBuRVhbluDThQ2EXHFXJO88DmPlTvg==; 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:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References: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=2kUSabp4MUVd01hpG+JEMqROOOE+TWGrU4K1QHiR5B0=; b=m8shtX87zYCQNJIihPtMuW96w2 oe683lkgLqc5sGM5XLqfVgBNxmWiY2PhXoHTlhvdAWz90NgRUQlxPD4FUciIjdHY+O0hVQUowCULN SQfRmLkhNvPZWY2PJZKiSx3tYTu0bImlunbSjc3m4WBZbMDz8m4BSKi0D28h0o5CVvddVzwvQQqUD 1/1ZZXmhLeKZRXiLd8vqgr5H15mvwO/fZbftTOiFaz+CSh/byGVfvtw1FPObLBvnxQufQ7NbXSdV9 7M8I53WyCuLu08a0SOQFZBStpI9MZyAHjJLS9Fg7ix2VUIc61FxDut7pKuVNWyGaxOTFsvaWioLNo 5Yz3SA/A==; Received: by zero.zsh.org with local id 1sMsdk-000Iw7-LZ; Thu, 27 Jun 2024 17:10:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f45.google.com) smtp.remote-ip=209.85.208.45; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ed1-f45.google.com ([209.85.208.45]:53331) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1sMsdB-000Icm-9w; Thu, 27 Jun 2024 17:09:59 +0000 Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-57cc30eaf0aso955460a12.2 for ; Thu, 27 Jun 2024 10:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719508197; x=1720112997; darn=zsh.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2kUSabp4MUVd01hpG+JEMqROOOE+TWGrU4K1QHiR5B0=; b=hyL5X86GL52PyP2aePTIhb/xyEajBkzHbZY3ObB3dhEvh1J/23LdhUYPSmaI3Q9+6C I2nPvaXJ9aDJ4KbaR2qwXTT6vWwcU+Hzmlx1E1C6vh9G5XKHm5cT5JH35GvBecBiaULO elSH52BrezwfvrCi6NPxRKPkKlYPiJztWgjDhpNI32r+dxBR8ykzsLuufOgdNM9PalyE Mg+2zU2PDNaRupEv7DObWq2vitOkfK9zqWmXTLNW+6ZiZuA7qqBvHA2MiY496ACns5ot XIUNpMOaWCAZesxtR2xb6t2v0tnpV5a667rABTng+QDA2PiuveDIZYShXS8lYXD9cMUO NVjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719508197; x=1720112997; h=cc: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=2kUSabp4MUVd01hpG+JEMqROOOE+TWGrU4K1QHiR5B0=; b=d8iGLiMWLOFcyPLhKFu5y7fptkxClRJQ0WVJLkYEJDi7ZwG6wPAZf1OsCof33mKkrg lUzlzcyFNk8yVk8wcdSojbDO7TNrl2A2m7i5kUG/IC6wd3FEWtlOSxi6W3ouczu4R4rS bvnEnN1UTWbGUywKZWZ5XmycezkdfcNFWnT/Jlt4sXetfvLoijoY68jtf7Hqu5QNDofG kSduxz8aMoCeM/u5OdFKOpzARnjlS9H13in+j2YPR7tcJduEcpDC/u/IRCEhFFCgMQkO i9IqeQMTbT2CTzpvcyuUIsdtvmTzIr4Le6OA8SA9NwbcDdlMlbE2LMZEMb4iRLQu+4wU LCRg== X-Gm-Message-State: AOJu0Yyj/XkGi0jQpAxS2FKSwwsEsHQTmcy7kq/0KQ6W5rlLW7jKlm3Z 7ASNTdV3jUeOLzPJMVz3cx9y9Bvz9V3KAsOFOgn7wkoAI7+1g/0Iun4eKSARi08hSuP4qpOOFXx iq9StM9TWtw9+Z957FkyIMJXre524w9Yv X-Google-Smtp-Source: AGHT+IFEKq8UerGaIPa/PFrGnxq0FMIkIXQLWaO8j3BUsQ8hwMUdq/x9DeL9gfNgVmSFnkHk0qKXqJX2SMjOUokQC8s= X-Received: by 2002:a05:6402:4305:b0:582:1a24:76d5 with SMTP id 4fb4d7f45d1cf-5821a2478bcmr9102002a12.35.1719508196400; Thu, 27 Jun 2024 10:09:56 -0700 (PDT) MIME-Version: 1.0 References: <5d54375e-8673-45f0-b5ac-f5e0e233d56f@inlv.org> <2a5f0fa7-23bf-4069-b237-d304965f142e@app.fastmail.com> <33ca21c3-69f8-49f7-9350-2ff9cc4febca@app.fastmail.com> In-Reply-To: From: Philippe Altherr Date: Thu, 27 Jun 2024 19:09:44 +0200 Message-ID: Subject: Re: errexit and (Z)ERR trap regression To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="0000000000003c28a1061be23383" X-Seq: 52979 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: --0000000000003c28a1061be23383 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > Ok, this makes much more sense to me than the previous patch. Thanks > for digging in. To me too :-) It's definitely cleaner and easier to follow. Philippe On Thu, Jun 27, 2024 at 6:44=E2=80=AFPM Bart Schaefer wrote: > On Wed, Jun 26, 2024 at 7:01=E2=80=AFPM Philippe Altherr > wrote: > > > > It's true that in the first iteration of the while loop, the noerrexit = =3D > oldnoerrexit is always a nop. However, that isn't the case for subsequent > iterations and in particular for the last iteration where it's important = to > always restore noerrexit to its original value (i.e., oldnoerrexit) even = if > that value isn't equal to 0. > > > > Now that I see this code under this angle, I think that a better versio= n > is one where noerrexit =3D oldnoerrexit is placed after the switch statem= ent. > > Ok, this makes much more sense to me than the previous patch. Thanks > for digging in. > > --0000000000003c28a1061be23383 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ok, this= makes much more sense to me than the previous patch.=C2=A0 Thanks
for d= igging in.

To me too :-) It's definitel= y=C2=A0cleaner and easier to follow.

Philippe


On Thu, Jun 27, 2024 at 6:44=E2=80=AFPM Bart Schaefer <<= a href=3D"mailto:schaefer@brasslantern.com">schaefer@brasslantern.com&g= t; wrote:
On Wed= , Jun 26, 2024 at 7:01=E2=80=AFPM Philippe Altherr
<philipp= e.altherr@gmail.com> wrote:
>
> It's true that in the first iteration of the while loop, the noerr= exit =3D oldnoerrexit is always a nop. However, that isn't the case for= subsequent iterations and in particular for the last iteration where it= 9;s important to always restore noerrexit to its original value (i.e., oldn= oerrexit) even if that value isn't equal to 0.
>
> Now that I see this code under this angle, I think that a better versi= on is one where noerrexit =3D oldnoerrexit is placed after the switch state= ment.

Ok, this makes much more sense to me than the previous patch.=C2=A0 Thanks<= br> for digging in.

--0000000000003c28a1061be23383--