delorie.com/archives/browse.cgi | search |
Date: | Wed, 15 Jan 2003 09:53:38 +0300 |
From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | djgpp-workers AT delorie DOT com |
Message-Id: | <2593-Wed15Jan2003095337+0200-eliz@is.elta.co.il> |
X-Mailer: | emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 |
In-reply-to: | <E18XkXR-0001ZC-00@phekda.freeserve.co.uk> |
(rich AT phekda DOT freeserve DOT co DOT uk) | |
Subject: | Re: fstat, fd_props and inventing inodes [PATCH] |
References: | <E18XkXR-0001ZC-00 AT phekda DOT freeserve DOT co DOT uk> |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> Date: Sun, 12 Jan 2003 16:01:53 +0000 > From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk> > > Below is a revision of Andrew's patch to make fstat generate > the same inode for a file irrespective of which file name > was used to open the file or how many times fstat has been called. > (Calling fstat multiple times on file descriptor gives different > inode values each time on Windows '98 SE.) > > Basically: The patch uses fd_props to obtain the file name used > to open a file. It fixes up the file name and then uses > that as the input to _invent_inode. Did you try to see what does this do with (a) handles open on devices, and (b) redirected handles? Also, if you run _fixpath on a file name in a place other than where the file is actually opened, the program might be in a different directory, so _fixpath will produce incorrect results. Therefore, I believe that if we want to use fd_props for this, we should run _fixpath on the file name when its info is recorded in fd_props. Then fstat should simply reuse the absolute name.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |