From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Clint Adams <clint@zsh.org>, zsh-workers@sunsite.dk
Subject: Re: [tbm@cyrius.com: Bug#130817: zsh's echo doesn't error if device is full]
Date: Sun, 27 Jan 2002 21:46:08 +0000 [thread overview]
Message-ID: <1020127214609.ZM9457@candle.brasslantern.com> (raw)
In-Reply-To: <20020127202152.GA32151@dman.com>
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
next prev parent reply other threads:[~2002-01-27 21:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-27 20:21 Clint Adams
2002-01-27 21:46 ` Bart Schaefer [this message]
2002-01-27 22:42 ` Clint Adams
2002-01-27 23:06 ` Clint Adams
2002-01-27 23:23 ` Clint Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020127214609.ZM9457@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=clint@zsh.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).