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: Eli Zaretskii
Subject: Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]
Date: Tue, 28 Mar 2017 22:19:16 +0300

> From: address@hidden
> Date: Mon, 27 Mar 2017 23:40:19 -0600
> Cc: address@hidden, address@hidden
> 
> Script is what started the discussion
> 
>       yes | gawk '{ print; fflush(stdout) }' | head
> 
> (Side note: 'stdout' isn't reserved in gawk; it's just an empty variable
> that has the effect of `fflush("")' meaning flush everything. "/dev/stdout"
> is what should have been used.)

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"™.



reply via email to

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