Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2007 12:51:26 -0500
From:      Mikhail Teterin <mi+mill@aldan.algebra.com>
To:        Erik Osterholm <freebsd-lists-erik@erikosterholm.org>
Cc:        questions@freebsd.org
Subject:   Re: tail does not exit
Message-ID:  <200712201251.27067.mi%2Bmill@aldan.algebra.com>
In-Reply-To: <20071220165807.GA34089@aleph.cepheid.org>
References:  <200712192322.lBJNMfps053071@aldan.algebra.com> <200712201102.59565@aldan> <20071220165807.GA34089@aleph.cepheid.org>

next in thread | previous in thread | raw e-mail | index | archive | help

четвер 20 грудень 2007 11:58 до, Erik Osterholm Ви написали:
> Ah, I see.  With very, very long lines, tail doesn't send the output
> all at once. The cutoff seems to be 65536 bytes on my system.

They don't even have to be very very long -- unless in an artificial example, 
such as the one I posted. Normal-width text files can also trigger 
inconsistent behavior in some real-life scenario, where awk actually does 
some real processing of its input for a while. The awk script may decide to 
quit after processing the first 1000 (normal-length) lines, for example... 

The behavior of the program will then be different depending on whether the 
average line-length is above, at, or below 65.536 characters.

Maybe, it is awk's fault -- it should not be read-ing more than one line at a 
time, because the script may cause it to ignore some of the read data.

Using line-buffering or some such?

 -mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712201251.27067.mi%2Bmill>