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 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