zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Zsh hackers list" <zsh-workers@zsh.org>
Cc: "Samuel Bancal" <Samuel.Bancal@epfl.ch>
Subject: Re: broken pipe message with setopt PRINT_EXIT_VALUE
Date: Sun, 30 May 2021 12:29:47 +0000	[thread overview]
Message-ID: <f89673de-cc9e-4abd-b798-8163030a6f9e@www.fastmail.com> (raw)
In-Reply-To: <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@daniel.shahaf.name> 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


  reply	other threads:[~2021-05-30 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 17:06 Samuel Bancal
2021-05-28 20:01 ` Stephane Chazelas
2021-05-28 21:26   ` Bart Schaefer
2021-05-29  6:37     ` Samuel Bancal
2021-05-29 11:43     ` Daniel Shahaf
2021-05-29 15:52       ` Bart Schaefer
2021-05-30 12:29         ` Daniel Shahaf [this message]
2021-05-30 17:44           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f89673de-cc9e-4abd-b798-8163030a6f9e@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=Samuel.Bancal@epfl.ch \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).