bug-gawk
[Top][All Lists]
Advanced

[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: Wed, 29 Mar 2017 08:36:05 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Mar 28, 2017 at 10:19:16PM +0300, Eli Zaretskii wrote:
> Yep, just like I thought:
> 
>   D:\usr\eli>yes | d:\gnu\gawk-4.1.61\gawk "{ print; fflush(stdout) }" | head
>   y
>   y
>   y
>   y
>   y
>   y
>   y
>   y
>   y
>   y
>   gawk: cmd. line:1: (FILENAME=- FNR=264) fatal: fflush: cannot flush 
> standard output: Invalid argument
>   yes: standard output: Invalid argument
>   yes: write error
> 
> Which is hardly what we want.
> 
> This "needs work"™.

Is this using the master branch? If so, it seems to imply that when fflush 
fails,
it is not setting errno to EPIPE. Otherwise, I don't know how to account
for the "fatal" message. I guess that could make sense. Is the "fatal"
message such a horrible result? Is this a regression from previous versions?
Did 4.1.4 simply hang without ever detecting the write/fflush failure?

Regards,
Andy



reply via email to

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