bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug 984910] rm fails to detect errors in readdir(3)


From: Bernhard Voelker
Subject: Re: [Bug 984910] rm fails to detect errors in readdir(3)
Date: Thu, 23 Jun 2016 00:53:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0

On 06/22/2016 03:01 PM, Pádraig Brady wrote:
> It'll need this on top, to better differentiate FTS_ERR and FTS_DNR,
> as fts_build may be called multiple times for the same dir.

Hmm, but rm(1) won't show the errno.

I'm getting better results with the attached, i.e., handling the
readdir() failure like the other failures way down and setting the
FTS_STOP flag.

With Peter's LD_PRELOAD lib, I'm getting this:

  $ LD_PRELOAD=/tmp/libfake_readdir.so ~/findutils/find/find /tmp/ddd
  /tmp/ddd
  Forcing failure of readdir
  /home/berny/findutils/find/find: failed to read file names from \
  file system at or below ‘/tmp/ddd’: Too many levels of symbolic links

  $ LD_PRELOAD=/tmp/libfake_readdir.so ~/coreutils/src/rm -rfv /tmp/ddd
  Forcing failure of readdir
  Forcing failure of readdir
  /home/berny/coreutils/src/rm: fts_read failed: Too many levels of \
  symbolic links

WDYT?

Have a nice day,
Berny

Attachment: gnulib-readdir-error-v2.patch
Description: Text Data


reply via email to

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