[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH] |
Date: |
Tue, 21 Mar 2017 13:02:05 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
On Sun, Mar 19, 2017 at 01:16:01AM -0600, address@hidden wrote:
> I'll rework the order of things. I don't know that the difference is really
> measureable, but you're right, why go through the hassle...
I see that you committed the patch. I have a few questions:
- Shouldn't we update ERRNO if fflush causes an I/O error that we ignore
because non-fatal is set? I don't think your patch does this. I based my patch
on builtin.c:efwrite, assuming that the behavior should be consistent.
This is an issue in builtin.c:do_fflush and in io.c:non_fatal_flush_std_file.
- Also in io.c:efwrite, I fixed a bug in the fatal message where it always
says "standard output", even if the actual problem occurred writing standard
error:
@@ -139,7 +139,7 @@ wrerror:
update_ERRNO_int(errno);
else
fatal(_("%s to \"%s\" failed (%s)"), from,
- rp ? rp->value : _("standard output"),
+ rp ? rp->value : ((fp == stdout) ? _("standard output")
: _("standard error")),
errno ? strerror(errno) : _("reason unknown"));
}
- In io.c:flush_io, when flushing all open files in the redirection list,
an error return from rp->output.gawk_fflush never triggers a fatal error.
Is that an oversight or intentional? It seems to be inconsistent with
print/printf behavior, as implemented in builtin.c:efwrite.
Regards,
Andy
- [bug-gawk] Behavior of fflush with SIGPIPE on stdout, alexandre.ferrieux, 2017/03/07
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout, david kerns, 2017/03/07
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/10
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], alexandre.ferrieux, 2017/03/10
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/10
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Arnold Robbins, 2017/03/17
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/17
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], arnold, 2017/03/19
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/19
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], arnold, 2017/03/20
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH],
Andrew J. Schorr <=
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], arnold, 2017/03/22
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], arnold, 2017/03/23
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/23
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], arnold, 2017/03/24
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/24
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], FERRIEUX Alexandre - IMT/OLN, 2017/03/25
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/25
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], FERRIEUX Alexandre - IMT/OLN, 2017/03/25
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], Andrew J. Schorr, 2017/03/25
- Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH], FERRIEUX Alexandre - IMT/OLN, 2017/03/25