bug-coreutils
[Top][All Lists]
Advanced

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

Re: cat fionread usage bug?


From: Pádraig Brady
Subject: Re: cat fionread usage bug?
Date: Wed, 11 Mar 2009 10:14:27 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Jim Meyering wrote:
> Pádraig Brady wrote:
>> I was just looking at this line in cat.c: http://url.ie/1aq1
>>
>>     if (input_pending)
>>         write_pending (outbuf, &bpout);
>>
>> Shouldn't that be?
>>
>>     if (!input_pending)
>>         write_pending (outbuf, &bpout);
> 
> Oh!  You're right.
> That's a bug (mine): disabled optimization.
> 
>> The checkin I think is 790892db:
> 
> Yes, indeed.  Here's the URL:
> 
>     http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=790892db
> 
> Have you tried to demonstrate the unwanted behavior?

The following should output 1

(printf 1; sleep 2; printf 3) | timeout 1s cat -v | wc -c

If I change it as suggested above it does.
Nobody has complained in the last 2 years,
but I guess it's worth keeping the functionality.

cheers,
Pádraig.





reply via email to

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