bug-coreutils
[Top][All Lists]
Advanced

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

bug#8154: du: issue with `--files0-from=DIR'


From: Eric Blake
Subject: bug#8154: du: issue with `--files0-from=DIR'
Date: Wed, 02 Mar 2011 07:46:21 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

[adding bug-gnulib]

On 03/02/2011 06:28 AM, Stefan Vargyas wrote:
> Dear maintainers,
> 
> While building and running coreutils v8.9, I came across the following issue 
> of 'du':
> 
>   $ mkdir /tmp/foo
>   $ du --files0-from=/tmp/foo
>   du: `/tmp/foo': read error: Is a directory
>   ...
> 
> The program enters an infinite loop

Thanks for the report.  This is indeed a bug.

I wonder if the better fix would be to modify the gnulib argv-iter
module to make argv_iter_init_stream to fail if fileno(fp) is a
directory, since not all platforms reliably fail with EISDIR when doing
read() on a directory (some, like BSD, successfully return EOF, and some
older systems even read raw directory contents).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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