[Top][All Lists]

[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: Fri, 10 Mar 2017 16:42:07 -0500
User-agent: Mutt/1.5.21 (2010-09-15)


On Fri, Mar 10, 2017 at 05:16:59PM +0100, address@hidden wrote:
> Thanks a lot, that's exactly what I hoped for :)

You're welcome.

> Regarding existing code, please bear in mind that those script that
> rely on this behavior (1) do it only since 2013 ; (2) are
> incompatible with other awk implementations and (3) depend in a very
> sensitive manner in stdio buffer sizes, since this for a given
> sequence
>       print ...
>       print ...
>       print ...
>       fflush(stdout)
> ... the precise line where the error bursts will vary depending on buffer 
> filling.
> Currently (without your patch), the program will randomly exit (error on 
> print) or not (error on fflush).
> With your patch, the program will reliably exit on any of those lines, 
> regardless of the tuning of stdio.

That sounds logical to me. I think the patch is approximately correct.
However, I do not recommend running the master branch with this patch in
production, since I think there are some other bugs in the master branch.

> Thanks again and looking forward to downstream integration in my distro ;-)

I'm not sure how far we are from a 4.2 release. If it's going to take a while,
I could backport a version for 4.1.4.


reply via email to

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