X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0 	tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
From: "Matthew Kidd" <matthew.j.kidd@gmail.com>
To: <cygwin@cygwin.com>
Subject: Spurious 'grep: writing output' in Cygwin 1.7.5-1 in certain cases
Date: Mon, 19 Apr 2010 14:19:45 -0700
Message-ID: <CE4D3C6371BA4722B73A7015133FC9B6@ghc.local>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

We are seeing grep emit 'grep: writing output' multiple times in
certain cases where the output of grep is piped to another program.
Specifically, we see it in the following cases:

  grep thisandthat foo.txt | head
  grep thisandthat foo.txt | less

In the latter case the 'grep: writing output' messages do not appear
until pressing Q to quit less.

There appear to be two 'grep: writing output' messages for each
line grepped.

Not all pipe operations exhibit this behavior. For example with the
same file, we do not see it in either of these cases:

  grep thisandthat foo.txt | last
  grep thisandthat foo.txt | wc

Moreover a non-piped grep does not exhibit this behavior:

  grep thisandthat foo.txt

Nor do we see it if the output of grep is redirected:

  grep thisandthat foo.txt > out.txt

Note: in this case 'grep: writing output' does not appear in
out.txt; my guess is that they are being sent to STDERR when they
do occur.

  - Matthew Kidd



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

