Date: Mon, 20 Jan 2003 21:37:28 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-Id: <2427-Mon20Jan2003213728+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: <3E2BFD47.F2FCA284@phekda.freeserve.co.uk> (message from Richard Dawe on Mon, 20 Jan 2003 13:44:39 +0000) Subject: Re: fstat, fd_props and inventing inodes [PATCH] References: <2593-Wed15Jan2003095337+0200-eliz AT is DOT elta DOT co DOT il> <3E2BFD47 DOT F2FCA284 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 Precedence: bulk > Date: Mon, 20 Jan 2003 13:44:39 +0000 > From: Richard Dawe > > > > Did you try to see what does this do with (a) handles open on devices, > > and (b) redirected handles? > > Results for (a): [...] Thanks for the footwork. Looks like everything's okay, right? Or do I miss something? > > 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. > > Well, it turns out that __set_fd_properties() runs the file name through > _truename(), before storing it. I think _truename() is sufficient - I don't > think we need to call _fixpath in fstat(). I think we can just use whatever > __get_fd_name() returns. `_truename' might return a UNC, in which case you don't have a drive letter to determine the st_dev member of struct stat. So if we do as you suggest, we need to handle this case inside `__set_fd_properties'. Otherwise, this plan is okay with me.