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: 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: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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. -- 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/