From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 7152 invoked from network); 8 May 2020 06:52:16 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 8 May 2020 06:52:16 -0000 Received: (qmail 23045 invoked by alias); 8 May 2020 06:52:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45792 Received: (qmail 4023 invoked by uid 1010); 8 May 2020 06:52:03 -0000 X-Qmail-Scanner-Diagnostics: from mail-il1-f179.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25801. spamassassin: 3.4.4. Clear:RC:0(209.85.166.179):SA:0(-2.0/5.0):. Processed in 3.506236 secs); 08 May 2020 06:52:03 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.179 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5+WWEdAEfgeO4s/YlyUPyTAgcIIGhoq/YA1z6sUUUao=; b=OvtfQRNj1YUA/yLt3B+t2hmp1Bn8iz9Be2axN3zeuWab1ltFluiLY1Jl5L/48jH7Ml /gRp/47CyG7gjtIMQ+XMcevWAc8qOD6reBFQ8s7omkGcijpqkcNmpAb/hDuTjJs8/G+W N9pnjs47s8AD6O8tEuYPYUonnRNGx2jRggY7qox8p7tUTA+JXVYai4mJccDxNjGWaN5W iuhTthp+gXS3aj66n8EdIHZV6UfG5CGIpKNb+Y7DJdKNu4REYaud5HCbNdEGt/X9B5+N RvBE2nUwk7AdZmNedhFQ77FjPEooRJoaILNcM5c+OBencNhH6GGXY+LHt2hGAomXqnQg FvWA== X-Gm-Message-State: AGi0PuYtJRT00nplbEV29jj5HR2kGYlPDo8urTmTpNG+R/1dHOPPSraI /Va1Eax31wcY8A9GsfItKUfSgp26smTPp6KgYDbaYWY0HwA= X-Google-Smtp-Source: APiQypJfJ6dbwRWmWIs3td930jUfmRnWhRSqEnA5EYOXea6AdnKga/Ytnm2IDnu0s6nsi3pg76TnRRc/2v0E5C+v718= X-Received: by 2002:a05:6e02:48b:: with SMTP id b11mr1201069ils.304.1588920687405; Thu, 07 May 2020 23:51:27 -0700 (PDT) MIME-Version: 1.0 References: <20200507212136.3ff1a843@tarpaulin.shahaf.local2> In-Reply-To: <20200507212136.3ff1a843@tarpaulin.shahaf.local2> From: Roman Perepelitsa Date: Fri, 8 May 2020 08:51:16 +0200 Message-ID: Subject: Re: local_traps doesn't restore traps set from functions To: Daniel Shahaf Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Thu, May 7, 2020 at 11:21 PM Daniel Shahaf wrote: > > The following patch fixes it: Thanks for the patch. I confirm that it works. I've tried a handful of different combinations of traps and all work as expected. One stylistic suggestion for the patch: replace sigtrapped[i] fixup with this: sigtrapped[i] -= 1 << ZSIG_SHIFT; It'll align the code with the preceding comment to the point of making the comment superfluous. I also find it easier to understand although that may be subjective. Roman.