Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Weird interaction between zpty and trap
- X-seq: zsh-workers 51596
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Weird interaction between zpty and trap
- Date: Wed, 22 Mar 2023 17:07:19 -0600
- Archived-at: <https://zsh.org/workers/51596>
- In-reply-to: <CAH+w=7bE0CtUECKRw45cXMjRN3Muhq4N2+y+C4N=p3KyOxsPjg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAMP44s1GSi7JN=7ztJ7VKn+eDcX4HsBxpDCNqrZEbZqxBdNWzw@mail.gmail.com> <CAH+w=7bE0CtUECKRw45cXMjRN3Muhq4N2+y+C4N=p3KyOxsPjg@mail.gmail.com>
On Wed, Mar 22, 2023 at 4:06 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Mar 21, 2023 at 9:50 PM Felipe Contreras
> <felipe.contreras@xxxxxxxxx> wrote:
> >
> > Should the command executed by zpty keep the EXIT trap?
>
> Tough call. It's technically a subshell, so by that distinction it
> should follow the rules for subshells.
The documentation of trap says:
ZERR and DEBUG traps are kept within subshells, while other traps are reset.
That sounds like EXIT should be reset.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author