[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24941: Early termination bug in grep 2.26
From: |
Jim Meyering |
Subject: |
bug#24941: Early termination bug in grep 2.26 |
Date: |
Tue, 15 Nov 2016 15:13:27 -0800 |
On Tue, Nov 15, 2016 at 2:13 PM, Norihiro Tanaka <address@hidden> wrote:
>
> On Tue, 15 Nov 2016 11:35:15 -0800
> Jim Meyering <address@hidden> 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
> $
Good point. While I suspect that would be much less likely to cause
trouble in practice, I would now rephrase:
We should retain the optimization when reading from stdin that is
neither a pipe nor a tty.
- bug#24941: Early termination bug in grep 2.26, Gary Johnson, 2016/11/13
- bug#24941: Early termination bug in grep 2.26, Jim Meyering, 2016/11/14
- bug#24941: Early termination bug in grep 2.26, Paul Eggert, 2016/11/15
- bug#24941: Early termination bug in grep 2.26, Jim Meyering, 2016/11/15
- bug#24941: Early termination bug in grep 2.26, Norihiro Tanaka, 2016/11/15
- bug#24941: Early termination bug in grep 2.26,
Jim Meyering <=
- bug#24941: Early termination bug in grep 2.26, Paul Eggert, 2016/11/15
- bug#24941: Early termination bug in grep 2.26, Jim Meyering, 2016/11/15
- bug#24941: Early termination bug in grep 2.26, Paul Eggert, 2016/11/19
- bug#24941: Early termination bug in grep 2.26, Jim Meyering, 2016/11/19