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: find and /cygdrive/c


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/


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