Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] builtin echo doesn't check write error
- X-seq: zsh-workers 49046
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] builtin echo doesn't check write error
- Date: Wed, 9 Jun 2021 19:16:17 +0100
- Archived-at: <https://zsh.org/workers/49046>
- In-reply-to: <CAH+w=7bVY_1Tedy1d1Yy55+XjbNAWdGJvMQ0mU+54+6xpAyoag@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- References: <20210609140940.GA813383@zira.vinc17.org> <CAH+w=7bVY_1Tedy1d1Yy55+XjbNAWdGJvMQ0mU+54+6xpAyoag@mail.gmail.com>
2021-06-09 09:13:42 -0700, Bart Schaefer:
[...]
> My (possibly poor) recollection is that this was made this way in part
> for ports to environments that don't have a /dev/null device
While that sounds like a very plausible reason for the original
behaviour whereby "print" would not report any write error,
that doesn't really tie up with the current behaviour where
the error is supressed only when print/echo's stdout is
explicitly closed.
Why would one write print foo >&- in the first place, other than
to check whether print reports error or not (and in that regard,
the behaviour is very misleading)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author