From nobody  Wed Apr 29 00:13:25 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id AAA10866;
          Wed, 29 Apr 1998 00:13:25 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199804290713.AAA10866@hub.freebsd.org>
Date: Wed, 29 Apr 1998 00:13:25 -0700 (PDT)
From: archer@lucky.net
To: freebsd-gnats-submit@freebsd.org
Subject: grep doesn't flush its output.
X-Send-Pr-Version: www-1.0

>Number:         6448
>Category:       gnu
>Synopsis:       grep doesn't flush its output.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 29 00:20:01 PDT 1998
>Closed-Date:    Wed Apr 29 07:26:58 PDT 1998
>Last-Modified:  Wed Apr 29 07:27:52 PDT 1998
>Originator:     Alexander Litvin
>Release:        3.0-CURRENT
>Organization:
Lucky Net Ltd.
>Environment:
FreeBSD grape.carrier.kiev.ua 3.0-CURRENT FreeBSD 3.0-CURRENT #72:
Tue Apr 28 14 :18:19 EEST 1998  archer@grape.carrier.kiev.ua:/usr/src/sys/compile/GRAPE i386
>Description:
grep uses fwrite() to write its output. Without flushing stdin it
means that the following:
$ tail -f foo | grep bar | grep zu
won't work.
>How-To-Repeat:
Run 'grep foo | cat'. Until 'grep' finds EOF, nothing will be read
(and written to the screen) by 'cat'.
>Fix:
In prline(), gnu/usr.bin/grep/grep.c, stdout should be flushed after
fwrite().
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed Apr 29 07:26:58 PDT 1998 
State-Changed-Why:  
no it shouldn't, that would be a major performance pessimization. 
If anything a option doing the same as "cat -u" should be 
implemented. 
>Unformatted:
