Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "functions -c" and TRAPxxx
- X-seq: zsh-workers 50357
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: "functions -c" and TRAPxxx
- Date: Thu, 9 Jun 2022 09:55:13 +0100 (BST)
- Archived-at: <https://zsh.org/workers/50357>
- Importance: Medium
- In-reply-to: <CAH+w=7ZJJv4KEXdW=2Pgqk+1YxjrmwX-HA5EBo00ZPgfM6N=gg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Yp+vr_zbAd3YELD_AN_JTi7R_yDFTM7vt+X6AR00=z5A@mail.gmail.com> <1148576327.671240.1654595869665@mail2.virginmedia.com> <CAH+w=7asDd+fxxcqg9c=DcKfo1gKSnuyL3PskX7Fdf192Hfwdg@mail.gmail.com> <CAH+w=7ZJJv4KEXdW=2Pgqk+1YxjrmwX-HA5EBo00ZPgfM6N=gg@mail.gmail.com>
> On 09 June 2022 at 04:24 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Jun 7, 2022 at 7:57 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > I know most of what's going on there, but "functions -c" is creatin
> > an alternate name, and there is also the failure case of settrap()
> > returning nonzero to handle.
>
> The following works for the case of settrap() succeeding, but I'm not
> sure how to force settrap() to fail.
Looks entirely plausible; given TRAP{INT,QUIT} already work this ought
to work too.
Looks like the only way for settrap to fail is using a signal number
that's not handled interactively.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author