bug-coreutils
[Top][All Lists]
Advanced

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

Improved tail patch


From: tigger
Subject: Improved tail patch
Date: Mon, 19 Jul 2004 17:25:02 +0000
User-agent: Mutt/1.5.6i

All,

Further testing of my last patch revealed tail using a lot more CPU than
it should. Please forgive the naieveity of my last patch. Attached is a
proper fix for the problem.

FIFOs are no longer stat'd every time round the tail_forever loop, there
is no point as they don't change size.

Added a read_eof flag to let us know we can skip checking this FIFO and
sleep for one interval. This prevents us checking every FIFO by doing a
read each time round the loop.

If data is read from one of more FIFOs during the loop, all FIFOs have
their read_eof flag reset next time round. This is to prevent the case
where two FIFOs have opposite read_eof flags causing tail to loop
forever flipping the two flags without sleeping (as "something has
always changed").

If there are any questions about this patch or improvements you would
like made, please let me know.

Many thanks,

Rob

-- 
rob holland - [ address@hidden ]
[ 5251 4FAC D684 8845 5604  E44F D65C 392F D91B 4729 ]

Attachment: tail.patch
Description: Text document

Attachment: pgpWw98abxpjC.pgp
Description: PGP signature


reply via email to

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