delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/13/18:16:36

X-Spam-Check-By: sourceware.org
Message-ID: <44665A91.5000103@cygwin.com>
Date: Sat, 13 May 2006 18:15:45 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051223 Fedora/1.5-0.2.fc4.remi Thunderbird/1.5 Mnenhy/0.7.3.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: question about inconsistent inode values for symbolic links to directories
References: <BAY103-DAV9247BC72E31CA57AD5CF8F8AD0 AT phx DOT gbl>
In-Reply-To: <BAY103-DAV9247BC72E31CA57AD5CF8F8AD0@phx.gbl>
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

julian_homer AT hotmail DOT com wrote:
> Hi,
> 
> I am getting some strange inode values for some symbolic links to
> directories from a C program I am writing to traverse directories.
> 
> My understanding of the inode values of symbolic links and C functions is a
> follows:
> 
> 1. executing C function "stat" on symbolic link should return the inode
> value for whatever the link points to.
> 
> 2. executing C function "lstat" on symbolic link should return the inode
> value of the actual symbolic link.
> 
> 3. executing C function "readlink" on a symbolic link and the executing a
> "stat" on the output of the readlink should produce and identical inode
> value to a executing a "stat" on the symbolic link.
> 
> 
> The issue I am encountering is that the inode values from a "stat" of the
> symbolic link don't match the inode values of a "stat" of the output from a
> "readlink" of the symbolic value.
> 
> I have been able to repeat this using cygwin on a different machine. I have
> also executed the code on a solaris 8 system but didn't encounter any
> problems.
> 
> Bellow is a listing that shows and example of the problem
> 
> "path" "readlink" "inode stat path" "inode lstat path" "inode stat readlink"
> 
> /link_test/test1/c/c /link_test/test1 180134 589824 180126
> /link_test/test1/c /tmp 156721 6815744 19870
> 
> I would be grateful if anyone can shed any light on this. Expect it is me
> being an idiot somewhere!

Try the latest snapshot.  See if that helps any.

<http://cygwin.com/snapshots/>


-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746

--
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