From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21507 invoked from network); 27 Jan 2002 21:46:19 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 27 Jan 2002 21:46:19 -0000 Received: (qmail 23634 invoked by alias); 27 Jan 2002 21:46:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16502 Received: (qmail 23620 invoked from network); 27 Jan 2002 21:46:12 -0000 From: "Bart Schaefer" Message-Id: <1020127214609.ZM9457@candle.brasslantern.com> Date: Sun, 27 Jan 2002 21:46:08 +0000 In-Reply-To: <20020127202152.GA32151@dman.com> Comments: In reply to Clint Adams "[tbm@cyrius.com: Bug#130817: zsh's echo doesn't error if device is full]" (Jan 27, 3:21pm) References: <20020127202152.GA32151@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams , zsh-workers@sunsite.dk Subject: Re: [tbm@cyrius.com: Bug#130817: zsh's echo doesn't error if device is full] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 27, 3:21pm, Clint Adams wrote: } Subject: [tbm@cyrius.com: Bug#130817: zsh's echo doesn't error if device i } } I tried putting some error-checking in bin_print, but it didn't seem to } make much difference. I suspect it's because bin_print() is using fprintf(), so the output is buffered by the stdio library and the error doesn't occur until the stream is flushed. There are a number of places in bin_print() that look something like: if (fout != stdout) fclose(fout); Try changing all of those to the equivalent of: if (((fout != stdout) ? fclose(fout) : fflush(fout)) != 0) { zwarnnam(name, "write error: %e", NULL, 0); ret = 1; } -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net