help-hurd
[Top][All Lists]
Advanced

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

Re: Grep --directories option


From: Stepan Kasal
Subject: Re: Grep --directories option
Date: Fri, 30 May 2003 13:50:14 +0200
User-agent: Mutt/1.2.5.1i

Hello!

On Fri, May 30, 2003 at 12:14:40PM +0200, Alfred M. Szmidt wrote:
> I added help-hurd@gnu.org to the CC list.

I've removed some people from the CC list.  I shouldn't have Cc'ed the
original question to him at first time as they are now going to get
lot of mail...

>    * BUT: grep 2.5 introduced a bug [1], which caused that grep behaved
>      as if the default was ``skip'' on sustems where reading a directory
>      is a faux pas.
> 
> I wouldn't call this a bug, ...

The code is equivalent to this:

  if (! fillbuf (save, stats))
      if (! is_EISDIR (errno, file) && ! suppress_errors)
        error (filename, errno);

This indeed is a bug as it ignores all errors related to reading dirs.
If there is a disk error while reading dir on GNU/Hurd, the error
is not reported.

Related to the quote from the docs:

>      just as if they were ordinary files (some operating systems and
>      filesystems disallow this, and will cause `grep' to print error
>      messages for every directory or silently skip them). If ACTION is

This text implies that it's OS dependent whether directories cause
an error or whether they are silently skipped.

But in fact it's grep 2.5.x who decides to ignore the errors.

Stepan




reply via email to

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