bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] fflush and redirection


From: Aharon Robbins
Subject: Re: [bug-gawk] fflush and redirection
Date: Fri, 15 Jul 2011 14:57:14 +0300
User-agent: Heirloom mailx 12.4 7/29/08

Hi. Sorry for the delay in replying.  Thanks for the bug report and
suggested patch.  Please try the patch below, instead, which restores the
code to what it was in 3.1.8. This is probably only the first of the
bugs where some bit of code got misplaced in translation to the new
internals.

Arnold

diff --git a/builtin.c b/builtin.c
index 724ea6d..1d841dc 100644
--- a/builtin.c
+++ b/builtin.c
@@ -105,7 +105,7 @@ efwrite(const void *ptr,
        if (fwrite(ptr, size, count, fp) != count)
                goto wrerror;
        if (flush
-         && (output_is_tty
+         && ((fp == stdout && output_is_tty)
              || (rp != NULL && (rp->flag & RED_NOBUF)))) {
                fflush(fp);
                if (ferror(fp))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]