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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15340 invoked from network); 21 Nov 2022 00:43:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Nov 2022 00:43:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668991421; b=Nl0l/XH04R33xfEaDnpBRH5tuUI6PXOT7t6tgKB6pnrTa5pLN6f+dqPyuTj6Q04LgTKK0blIAr 0mx193+pKwbli0J+Vl2paJDAxZOCUvdp0jKB2Z9wq8CLjBTsauYOfP+gZLJqPEXMVIukLSdp3j Hg/BvWV/irDdc3ncjucS7eg9t74YSpg497OlHHbUxA8KVlozQBFJfrVpT4FWMwpL9wtGtJ51YX pmqPjyj0caOeHZRwlkHKbKLIcbV13G1RCbzF7Uuld9bvmDjrwOaRDBThq64D0/b7s5BweXizlf QUFOTboXj+XtWsJm40JZ0VYl94eiETdy729xhEhw3F3RDQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f49.google.com) smtp.remote-ip=209.85.208.49; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1668991421; bh=M/s91idVoPOkYcM9bzAHu1QQao1WGOCxDP3U/0dE6tI=; 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=GU2TAbbb3mrvEeCAdzz3MfrzIlFim9rVp+xOUBB+x6qwji1mQRjhYRZAEcSljhZ5zZWNuR8DE7 Kjh3kkMhKTRJncuKHFcFCjtEm/7Uop8YjyObh1Cl1U4uh5VQHWwy5JbM1NSC7gFST2SDF4tAL2 Hy3J0y/zF56QMeWXlc3b5X7/TQlCcBigkqO49b0yBRPFZEeyWr9dx/E1NEiACYJUMAxmufLwZC xg7pNSDQIkBqpNIfb36nW8/d5oPf1/BZTcMjCGeZg+3tKVM8F5mlssODj/84YefPGHfho3YEaV x9EOdXSgFaYwRehCHSTK3Wk5MrrEexnTnWPULYyU/LglqA==; 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=EjM9hFgCT5ct06i7k3iuCXhCh8E9pdwehTUwhjhY1jk=; b=FqgAM6ALHIqqtvc4/6npAugXjL qsJq5ovavfZEuyMajItMbyzPrvDjr6yPH0VjZND4+auZGU7XPAi6DUbhgY5PCDu+OAnS1PinWqcUl dysbUQs9dhO1TamB5cTDHTWr3rvgl/Bxr5iW3mNsw3DoP9qbm/XX3y3NgJBwmPcWRXViow1kQ4JFY jLrFvSejAaeZ5nXP/hwjUSrHJC7jeARr5WzoQLqGyNhbHt33uZGsAm3slc4ZXsL8W/DkdGFO532LY yDWKfNIMq+YDgIQ29+sHv5p39GRth2WB4x86ZWkfixaC46DtVleeydzlPMdcyrd09fZeeK2w54Ccx Bj5+Jv/A==; Received: by zero.zsh.org with local id 1owuuS-000OGs-Hu; Mon, 21 Nov 2022 00:43:40 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f49.google.com) smtp.remote-ip=209.85.208.49; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f49.google.com ([209.85.208.49]:40956) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1owuuC-000NuR-6T; Mon, 21 Nov 2022 00:43:24 +0000 Received: by mail-ed1-f49.google.com with SMTP id e13so14152426edj.7 for ; Sun, 20 Nov 2022 16:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EjM9hFgCT5ct06i7k3iuCXhCh8E9pdwehTUwhjhY1jk=; b=XpTOUjJkROAnhlrAIzcDPcNJWlNYwH6SYYIpGahTMX7S9/fxHQn7VNfZI4/PwQ3S18 ElGJInbjpP0iG94lh9YplqZHFC8TNGoaR48zwooZSmy+K0Tu4fPD99D6EuYIHZ53GWr4 y4w88pR/h2OSnIGJvp0G0WfSVLFmL2+MDvdSH+lb0es3F75Lhy/gKzxaVj3X4y3EgYc1 SHQeFUJX4w+ET+hQH/8vJN8z8FzHMWtlBeEqU1L9wu7wU8DQzCZYKJ3cJG26mr1ctaky AVl0eprgcfIrRU3G1wJJQS0SoPHfee4BquOrr4soeqAbGYOMoni1GETv+egGWeHBtPwk Mccw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=EjM9hFgCT5ct06i7k3iuCXhCh8E9pdwehTUwhjhY1jk=; b=xRyoG2YGXJUqWMQZZEoA13KHs5ce+ZOYSpN1J1gt7+s/jdH/JrXhmn/hQ7f6gHXsox SxogMJcoDy34i0kNNZbQDYdMO2mhpR62YpD8sMZZjKe79XOpDqUKKgcu9MkAZsRlO12v 4x6oRxQDJXll6aVrPHTQ+KM0kkRALHo2o+zaq7fo9SyKbPFmgc3uSM41TlojgzCPsFeE VX8/0WWK8w+rJcWP/EJTNsv6l/l5V9gTnwUgWwWZj+347OWFL3omQfj7iXxt0GeT0sLN aK0QfF3G0RiBWZj77qQCNR8L134evuImwA652RFJDyw6kK+ZvWXSfLiTpIoPd9HuVHMz +rQw== X-Gm-Message-State: ANoB5plfkH6cf+1YezkhjxW/TxNH35d4PJKKQoeoZDzPMiV9FDqa41Kw rbnIL5qr56ohvgMTGhQjI4zupNwlLM+PN3a6hflJGg== X-Google-Smtp-Source: AA0mqf5AW0/7oQEUG2YK82wZNCq3jNOla7mzaAPmK5zAkezYv0o7qPoe2lZmB2el4wVQSI6s2oPBBcacftcGnvmFbFw= X-Received: by 2002:a05:6402:4507:b0:467:205b:723d with SMTP id ez7-20020a056402450700b00467205b723dmr4509522edb.69.1668991403863; Sun, 20 Nov 2022 16:43:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 20 Nov 2022 16:43:12 -0800 Message-ID: Subject: Re: [PATCH] Fix ERR_EXIT behavior in function calls and "always" statements To: Philippe Altherr Cc: Zsh hackers list , =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= Content-Type: text/plain; charset="UTF-8" X-Seq: 51002 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 Sat, Nov 19, 2022 at 5:39 AM Philippe Altherr wrote: > > I recommend submitting the 4 patches attached here. Thanks again. I'm generally more pleased with this set of patches because the number of places you had to save/restore this_noerrexit in the previous go-round seemed intuitively wrong to me. Each time though, you've removed the NEWS item. Although we've established that the behavior it describes was not actually appropriate, there still has been a change in ERR_EXIT behavior that probably warrants a mention. What's the best description of that? Question for the wider list: With this patch, anonymous functions behave like functions with respect to ERR_EXIT. This is reasonable, but it does mean that set -e { { false && true } } # does not exit () { { false && true } } # exits Are we all OK with this, and either way does it need to be called out somewhere? For the record (and per my above remark about NEWS) the previous behavior was that neither of these would exit. Frankly I'm still not certain that the extra level of { } should matter in the function example.