Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [tbm@xxxxxxxxxx: Bug#130817: zsh's echo doesn't error if device is full]
- X-seq: zsh-workers 16502
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Clint Adams <clint@xxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: [tbm@xxxxxxxxxx: Bug#130817: zsh's echo doesn't error if device is full]
- Date: Sun, 27 Jan 2002 21:46:08 +0000
- In-reply-to: <20020127202152.GA32151@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020127202152.GA32151@xxxxxxxx>
On Jan 27, 3:21pm, Clint Adams wrote:
} Subject: [tbm@xxxxxxxxxx: 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author