Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: refactor memstream for "print -v"



On Tue, 5 Jan 2016 09:48:21 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> 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 <barts@xxxxxxxxxxxxxxxxxxxxx>
Date:   Mon Feb 4 19:38:40 2002 +0000

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

pws



Messages sorted by: Reverse Date, Date, Thread, Author