www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/06/12/23:56:10

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <19990613035547.8465.rocketmail@web113.yahoomail.com>
Date: Sat, 12 Jun 1999 20:55:47 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: earnie_boyd AT yahoo DOT com
Subject: Re: duplicate inode number
To: cygwin developers <cygwin-developers AT sourceware DOT cygnus DOT com>
MIME-Version: 1.0

--- Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp> wrote:
> I reported this problem and the patch resolving it once, but there
> has been no response. So I try to explain it more concretely.
> 
> As reported in the cygwin mailing list, `mv' sometime complains
> completely different files are the same file. Because these files
> have the same inode number.
> 
> For example, 
> 
> $ touch 1 2 3 4 5
> $ mv 1 2
> mv: `1' and `2' are the same file
> $ ls -i
>    1447 1     1447 2     1445 3     1445 4     1447 5
> 
> This can be observed on Win9x in the snapshots since 12 Feb when the
> following changes are made.
> 
> Fri Feb 12 13:17:49 1999  Corinna Vinschen  <corinna DOT vinschen AT cityweb DOT de>
> 
>         * fhandler.cc (fhandler_disk_file::fstat): Handles directories,
>         returns unique i-node number.

The MS documentation says that the numbers could indeed be the same for
different files if you open/fstat/close then open/fstat/close.  The purpose of
MS's fileid number is so that you can check to see if you have the same file
open on more than one fd in the same process.  The fileid number is not unique
to the file but is unique to the process.  I could open the file in one process
and get fileid 1447 and in a different process open the same file and get
fileid 1449 as examples.  

I too suggest the change be reverted before the release of B21.  This I believe
was tested on WinNT where it seems to work.

Earnie.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


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