bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24941: Early termination bug in grep 2.26


From: Paul Eggert
Subject: bug#24941: Early termination bug in grep 2.26
Date: Tue, 15 Nov 2016 15:33:13 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

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>.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]