[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 ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature