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

Re: warning about closing an already closed file descriptor



# p.stephenson@xxxxxxxxxxx / 2015-01-20 11:39:43 +0000:
> On Tue, 20 Jan 2015 12:02:03 +0100
> Roman Neuhauser <neuhauser@xxxxxxxxxx> wrote:
> > > -  ({ exec 3<&- } 2>/dev/null
> > > -  exec 3<&-
> > > -  read foo <&-)
> > > +  (exec {varid}<&0
> > > +  exec {varid}<&-
> > > +  print About to close a second time >&2
> > > +  read {varid}<&-)
> > 
> > sorry if i'm talking out of my ass, but does this mean that
> > the non-{varid} syntax is now without a test?
> 
> For closing fd's, yes.  There's no output to test --- though there is a
> status, so we could still test that.  And I suppose the lack of an error
> message is itself a test...

yup, testing that stderr is actually quiet was my concern.  thanks a lot!

-- 
roman



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