delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/09/03:45:17

X-Spam-Check-By: sourceware.org
Subject: Re: find and /cygdrive/c
From: Jim Easton <jim AT cs DOT ualberta DOT ca>
To: cygwin AT cygwin DOT com
Date: Sun, 9 Apr 2006 01:44:59 -0600 (MDT)
CC: ericblake AT comcast DOT net, Jim Easton <jim AT cs DOT ualberta DOT ca>
Message-Id: <S561840AbWDIHo7/20060409074506Z+35@sunkay.cs.ualberta.ca>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dear Eric,

> > Version 4.2.27 had the same problem but 4.3.0 worked.
> 
> Glad I could help.  Hmm, even though 4.3.0 is marked
> alpha quality upstream, compared to stable 4.2.27,
> maybe I should go ahead and make 4.3.0 the current
> version for cygwin, since there have been several reports
> of 4.3.0 behaving nicer for users.

That, of course, is your call, but I think I would.  :-)

> 
> In your particular case, I wonder if it is related to the
> syscalls being made.  find in 4.3.0 uses opendir() to track
> directory traversal, whereas find in 4.2.27 (aka oldfind
> in 4.3.0) uses just open().  Can you validate that with
> 4.3.0 installed, using oldfind instead of find gives the
> same failure you were seeing with 4.2.27? 

This sounds very likely.  Years and years (at least 15) ago I wrote
a special purpose find, designed to find new, and big, files because
we were having trouble with users filling up the disks.  At the time
the man pages said you could not use open to read a directory.  It
compiled fine on every system I've tried it on since, including
cygwin.

The reason I mention this is that he always cd'd into the directory
he was searching and always opened ".".

Anyway, find 4.2.27:
I must have installed 4.3.0 several times :-( I really didn't have a
good handle on using setup).  oldfind claims he is version 4.3.0 too :-(.
Funny thing though, they are different sizes, find.exe is 142336 and
oldfind.exe is 139776 - they both work right.  Different compilers?

Anyway, I dug a 4.2.27 out of a cache directory and it does misbehave,
viz.
$ pwd    
/home/jim
$ ./find /cygdrive/c -iname \*find\* -print
./find: .: No such file or directory
./find: /cygdrive/c/AUTOEXEC.BAT: No such file or directory
./find: /cygdrive/c/AVG7QT.DAT: No such file or directory
...
$


Hope this helps.  :-)  If you like send me the source I would 
be happy to try it (ie. open vs. opendir) on my machine.

	Jim


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019