GNU bug report logs - #24941
Early termination bug in grep 2.26

Previous Next

Package: grep;

Reported by: Gary Johnson <garyjohn <at> spocom.com>

Date: Mon, 14 Nov 2016 02:42:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 24941 <at> debbugs.gnu.org
Subject: bug#24941: Early termination bug in grep 2.26
Date: Wed, 16 Nov 2016 07:13:14 +0900
On Tue, 15 Nov 2016 11:35:15 -0800
Jim Meyering <jim <at> meyering.net> wrote:

> I suppose you mean in addition to the S_ISFIFO test? That sounds good.
> We should retain the optimization when reading from stdin that is a
> non-pipe.

This can also happen in stdin.  If we redirect stdout to /dev/null,
grep-2.26 exits immediately and prompt is returned.

- grep-2.25

$ grep . >/dev/null
a  <<input a and newline
b  <<input b and newline
c  <<input c and newline

- grep-2.26

$ src/grep . >/dev/null
a  <<input a and newline
$





This bug report was last modified 8 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.