Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Weird interaction between zpty and trap
On Wed, Mar 22, 2023 at 5:07 PM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> 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.
OK. I'm just going to assume it's a bug in zsh I'll have to workaround
by removing the EXIT trap manually every time inside the zpty
subshell.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author