help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Bug? Output not flushed?
Date: Fri, 15 Sep 2023 09:56:17 -0700	[thread overview]
Message-ID: <CAH+w=7YnQmbVqNKHmt6nthB-+1KdFYhXt2vfVu2_uHP6S5RxMg@mail.gmail.com> (raw)

Easily reproduced:

% { print XXX; return 0; } >| /tmp/newfile; print $(</tmp/newfile)
% print $(</tmp/newfile)

That is, when a return statement appears in a current-shell complex
list, the output is not flushed until the parser reaches the top level
again.  If the return statement is removed, all is well:

% { print YYY; } >| /tmp/newfile; print $(</tmp/newfile)

Any idea where to start looking for this?

             reply	other threads:[~2023-09-15 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 16:56 Bart Schaefer [this message]
2023-09-15 17:05 ` Mikael Magnusson
2023-09-15 17:30   ` Bart Schaefer
2023-09-15 22:22     ` [PATCH] ? Parse error does not always set $? (Was: Bug? Output not flushed?) Bart Schaefer
2023-09-16  1:20       ` 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:

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

  git send-email \
    --in-reply-to='CAH+w=7YnQmbVqNKHmt6nthB-+1KdFYhXt2vfVu2_uHP6S5RxMg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \


* 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


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