This is the mail archive of the cygwin-developers@cygwin.com 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: ./.. changed during execution of find



Christopher Faylor wrote:
> 
> On Fri, May 14, 2004 at 04:22:15PM +0200, Corinna Vinschen wrote:
> >On May 14 09:35, Pierre A. Humblet wrote:
> >>The case reported on the list is probably due to a change in chdir.
> >>find scans / and chdir bin.  /bin is c:/cygwin/bin, but the canonical
> >>Posix name of that directory (longest prefix match) is /usr/bin.
> >>Eventually find chdir ..  and finds itself in /usr, not in /
> >>
> >>Fixing that means stop using mount_info->conv_to_posix and going back
> >>to normalize_posix_path.
> >
> >Right.  I'm just surprised how easily the situation would have been
> >reproducible and we both failed to reproduce it.  We should give back
> >at least one gold star.
> 
> Take one from me, too.  I suspect that the current code was specifically
> there to deal with that specific problem.  And, guess who wrote it?

Thanks for the stars, by the way.

When -follow is specified, everything goes well because find uses
fchdir to move up. I wish it would do that all the time.

With 1.5.9, things like 
cd /lib; cd terminfo 
fail, and the mount flags for relative paths depend on the sequence
of chdir's that led to the current directory.  
But that's less important than find... 

I will fix it. It also thought that the SetCurrentDirectory 
call should be done only after the muto is acquired. 
But perhaps that should be left for 1.5.11

Pierre


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