Subject: Re: Re: grep: very large file with no newline
Stepan Kasal wrote:
> On Sat, Nov 20, 2004 at 05:54:34PM +0100, Jim Meyering wrote:
> > Here, I suggest you just set errno not to saved_errno
> > but rather to ENOMEM, since saved_errno's value is not useful.
> yes, you are right. I attached an updated version of the patch.
> Is anyone willing to test it?
It works for me here.
Should it be a suppressible error though? The Open Group page says:
"-s Suppress the error messages ordinarily written for nonexistent
or unreadable files. Other error messages shall not be suppressed."
Also, instead of "Cannot allocate memory" I would prefer to see
something more descriptive like "File too big" or "Out of memory
while searching for end-of-line".