[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#8490: dd reads random number of records from pipes - named or ot
Re: bug#8490: dd reads random number of records from pipes - named or otherwise - coreutils 8.9
Wed, 13 Apr 2011 15:51:55 +0100
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199) Gecko/20100227 Thunderbird/3.0.3
On 12/04/11 22:02, Jesse Gordon wrote:
> I can't believe such an obvious bug would exist this long, but on the
> other hand the test is so simple I can't see where it's user error.
> dd, when reading from stdin or from a named pipe sometimes (but not
> always) reads a random number of records a bit less then what it should.
> I tried it like /dev/zero|dd, like yes|dd, cat somefile|dd, and even
> mkfifo pip; yes > pipe & dd if=pipe -- and all sometimes failed.
> However, if=arealfile seems to always work perfectly.
> To replicate:
> yes|dd bs=1000 count=1000|wc -c
Eric's email crossed with mine and won the race to close this,
hence resending reply to main list...
With the about to be released coreutils, we now warn about this:
$ yes|dd bs=1000 count=1000|wc -c
dd: warning: partial read (960 bytes); suggest iflag=fullblock
We can't do that by default for backwards compat reasons.
p.s. I just noticed that this is not in NEWS.
I'll fix that now...
|[Prev in Thread]
||[Next in Thread]|
- Re: bug#8490: dd reads random number of records from pipes - named or otherwise - coreutils 8.9,
Pádraig Brady <=