Mail Archives: djgpp-workers/2003/01/20/14:40:28
> Date: Mon, 20 Jan 2003 13:44:39 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> >
> > 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.
- Raw text -