Re: bsdgrep does not work with tail -f | grep combination

From: Gabor Kovesdan <gabor_at_FreeBSD.org>
Date: Thu, 05 Aug 2010 06:53:04 +0200
Em 2010.08.04. 20:06, Xin LI escreveu:
> I'm able to reproduce the GNU behavior on 9.0-CURRENT which is IMO right.
>
> I think we need to break at the line end to provide better interactivity
> (the current code seems to do it (buffer is not full&&  !eof), while
> what we wanted is (buffer is not full&&  !eof&&  !eol).
>
> The attached patch should fix this but I have not yet thoroughly tested
> it due to job work.
>
>    
I think the patch may break binary detection. That buffer is not a 
general buffer but filled in only once with the first n bytes of the 
file to check if the file is binary. If you stop after the first line, 
only the first line will be used for binary checking. I'll look at this 
problem soon.

Gabor
Received on Thu Aug 05 2010 - 02:53:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:05 UTC