GNU bug report logs -
#24941
Early termination bug in grep 2.26
Previous Next
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
On Tue, Nov 15, 2016 at 3:33 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> On 11/15/2016 03:13 PM, Jim Meyering wrote:
>>
>> We should retain the optimization when reading from stdin that is
>> neither a pipe nor a tty.
>
> I am toying with the idea of retaining the optimization only if lseek-to-EOF
> succeeds, a heuristic that is a bit more restrictive. This arguably would
> conform better to the POSIX requirement that when grep exits "the file
> offset in the open file description is properly positioned just past the
> last byte processed by the utility." See the INPUT FILES section of
> <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_04>.
I like it. That would make the offset in the input file predictable in
those cases.
This bug report was last modified 8 years and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.