This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange problem with find and directories

On May 16 01:56, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> $ strace --help
> ...
>   -V, --version                output version information and exit
> ...
> So man page needs to be more *case-sensitive*.  Also, it looks like -f

Dunno where the man page error stems from, but the official documentation
is correct:

> actually turns off the child tracing

This is documented in
as well:

  -f, --trace-children         trace child processes (toggle - default true)

> Finally, I had strace running without the -f switch, and it finished
> successfully, showing the following sequence in the trace file leading
> to errno 20 (ENOTDIR):
> [...]
>    28   86781 [main] find 5420 open: -1 = open(/home/lavr/test/dir, 0x30C000), errno 20
> Clearly, find would be happy to see ENOENT there (and it's actually what should have
> been flagged in the absence of the directory after its removal, as ENOTDIR is
> not applicable in such case).

Fixed in CVS.  You now get

  $ mkdir dir
  $ find . -name dir -type d -exec rm -rf '{}' \;
  find: `./dir': No such file or directory

as on Linux.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]