Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: broken pipe message with setopt PRINT_EXIT_VALUE
- X-seq: zsh-workers 48956
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxx>
- Cc: "Samuel Bancal" <Samuel.Bancal@xxxxxxx>
- Subject: Re: broken pipe message with setopt PRINT_EXIT_VALUE
- Date: Sun, 30 May 2021 12:29:47 +0000
- Archived-at: <https://zsh.org/workers/48956>
- In-reply-to: <CAH+w=7b4-NFtaphGp06PPw4u24wmFUJndxUBPEbARnTDD0+_mQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <b34b34de-dc52-8d24-9b3a-c641bb9bbd79@epfl.ch> <20210528200137.nw35xglpw7j2j4r7@chazelas.org> <CAH+w=7a+=gPiFVTuAEXo0b04N-vmT4zMxNX0+MeC==-Kxrp8HA@mail.gmail.com> <20210529114352.GB25290@tarpaulin.shahaf.local2> <CAH+w=7b4-NFtaphGp06PPw4u24wmFUJndxUBPEbARnTDD0+_mQ@mail.gmail.com>
Bart Schaefer wrote on Sat, 29 May 2021 15:52 +00:00:
> On Sat, May 29, 2021 at 4:44 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Bart Schaefer wrote on Fri, May 28, 2021 at 14:26:25 -0700:
> > > PRINT_EXIT_VALUE is disabled in subshells because subshells do not
> > > normally maintain a jobs table like an interactive shell does.
> >
> > That's the reason in implementation terms, but what's the reason in
> > user-facing terms?
>
> Command grouping. The exit value of the subshell is still printed by
> the parent if the whole group's status is nonzero.
This implies that it's a bug that «{ false; true }» prints a PRINT_EXIT_VALUE
message for «false».
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author