Subject: Re: PATCH: refactor memstream for "print -v"
From: Peter Stephenson <[email-masked]>
To: [email-masked]
Date: Tue, 05 Jan 2016 11:47:01 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Tue, 5 Jan 2016 09:48:21 +0000
Peter Stephenson <[email-masked]> wrote:
> > - I note in passing that "print something >&-" is explicitly not an error,
> >   but "print -u1 something >&-" IS an error.  Also unchanged here.
> 
> In the second case we've explicitly been told to "do something" with the
> fd, which happens to be dup'ing and fdopen'ing it.  There's no such code
> in the first place, and there doesn't seem any point in making the
> second case silent.  I suppose we'd have to detect bad writes in lots of
> places to pick up errors in the first case, but that would probably be
> the right thing to do in principle.

Ac tually, it appears this is deliberate.

commit c6d589aadd706b366b5207ac155f83510e5c408e
Author: Bart Schaefer <[email-masked]>
Date:   Mon Feb 4 19:38:40 2002 +0000

    16556: No error on `print >&-'.

pws