Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] ignored trap and subshell
- X-seq: zsh-workers 49304
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] ignored trap and subshell
- Date: Tue, 24 Aug 2021 10:33:49 -0700
- Archived-at: <https://zsh.org/workers/49304>
- In-reply-to: <CAH+w=7ZzBE2ZA7DUGv1aVMgMiWQxLA7-WqDpxk05guUYcNGEYw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20210824162330.GA3017045@cventin.lip.ens-lyon.fr> <CAH+w=7ZzBE2ZA7DUGv1aVMgMiWQxLA7-WqDpxk05guUYcNGEYw@mail.gmail.com>
On Tue, Aug 24, 2021 at 10:29 AM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Aug 24, 2021 at 9:24 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > However, with "emulate sh", ignored traps should still be ignored
> > in the subshell according to POSIX, and zsh 5.8 fails do conform:
>
> "emulate sh" is NOT the same as "ARGV0=sh", and is never going to be.
However, it appears this behavior isn't covered in regular sh emulation either:
% ARGV0=sh Src/zsh -c 'trap "" INT; trap; echo A; ( trap; echo B;
sleep 3; ); echo $?'
trap -- '' INT
A
B
^C130
So we should look into this.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author