This is the mail archive of the cygwin@sourceware.cygnus.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]

Re: B19: WinNT _stat()/_stat_worker() return bogus st


Earnie Boyd wrote:
> 
> CAUTION: the file index number is created on the first open of the 
> file/directory.  It will not remain unique to that particular file.  
> If you close all channels to that file and then open it again you will 
> most likely have a different file index number.  It's purpose is to 
> verify if you have the same file open on different handles.  It does 
> not uniquely identify the file/directory.

In my (admittedly limited) testing on NT, the file index numbers
remain the same across open/close cycles, and are even identical
when the files in question are hard linked together.  I realize that
the documentation claims that the numbers may change from open to
open, but at present on NT SP3, they do not seem to be doing so,
and the various utilities that rely on the st_ino field work much
better using the file index than using the filename.

-Roger
-- 
Roger Sunshine -   Phone: (512)349-5644   - Tempest Rules, NT doesn't
Senior Software Engineer - Knowledge Discovery One - sunshine@kd1.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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